Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

troy sincomb
troy sincomb
6,510 Points

Why use PeeWee if SQLalchemy is the gold standard? Makes me want to skip this set of videos all together :(

I hope treehouse would dive into SQLalchemy. There is practically one legit person working on PeeWee (talented as he may be), but a whole team for SQLalchemy. Why would treehouse openly spend so much of their time to create a series of videos for something that is being out competed?

1 Answer

Steven Parker
Steven Parker
229,708 Points

Reasons you might use PeeWee (all direct quotes from the author, Charles Leifer):

  • It's damn small, and easy to pick up and use. I think this is the #1 reason people use it.
  • I've worked very hard to provide consistent APIs, meaning learn once/apply everywhere.
  • I fix bugs really quickly.
  • Raymond Hettinger said "The code is nicely written and is easily read start to finish." :)
  • AsyncIO via aiopeewee / muffin-peewee
  • Admin interface via flask-admin
  • Cool extensions
  • Fast, memory efficient, good performance for an ActiveRecord ORM

And one more (suggested by troy's comment): PeeWee has a nice course on Treehouse.

troy sincomb
troy sincomb
6,510 Points

You just copy and pasted what the guy in charge of peewee had to say on reddit...

--------the other half of his comment--------

Weaknesses: Pretty much just me working on it, though I do accept patches and work hard to fix bugs quickly. Small ecosystem of third-party libraries / integrations ActiveRecord as opposed to Data Mapper / ID Map / Unit-of-work implemented in SQLA Lower "google-ability" factor Fewer stackoverflow answers No automatic schema migrations Doesn't support Oracle or Microsoft SQL Server.

SQLalchemy is used factors more than peewee, but doesn't have a nice tutorial like the one treehouse made for peewee :/

Steven Parker
Steven Parker
229,708 Points

As I said, those are all direct quotes from the author. And I only quoted the part that answered the question "Why use PeeWee..." :wink: