Hacker News new | ask | show | jobs
by katelynsills 3179 days ago
Great list! I noticed Tastypie wasn't included. I've really liked it, but are there reasons I shouldn't be using it?
4 comments

In general Django REST Framework is a better package. Hooking in your own customization is less ad-hoc with DRF than with Tastypie, I've found. The DRF documentation is also absolutely stellar and the wider ecosystem around it is really good.

edit: And to my sibling commenter's point, DRF has a funding model, so it's being actively worked on full time.

Having used both, DRF is a lot more similar to standard Django. The views are similar, and the serializers work very similarly to forms so it feels a lot more consistent to use. I seem to remember a post a could of years back where they said they weren't going to be doing more active development in Tastypie, or something to that effect.
Having years of experience with both, I could write an article on why to prefer DRF over Tastypie for general purposes - but one simple reason is that Tastypie is effectively on life-support (taking substantial time to even release versions compatible with new Django versions), while DRF has substantial and accelerating momentum in both its codebase and community around it.
Django Rest Framework is one of the reasons i use django so much. It is done in a really solid way, allowing great power and flexibility over how you want to abstract your rest API. I've used tastypie before, but got the feeling it wasn't as fleshed out as DRF. I remember coming across strange behaviour with complex nested data. Moving over to DRF empowered me.
It looks like the author prefers Django REST Framework (DRF) instead of Tastypie. I can't compare them on their technical merits as I've never used Tastypie, but I do know that DRF is actively developed and has some kind of backing. DRF is one of my "always on" Django packages.
Actually, I remember some years back that when I needed a REST API for a project I started with django-tastypie because back then (circa 2012) was more popular than DRF. Unfortunately, I did not have a good experience with it (too long to release a new version to support new django version) so I switched over to DRF and hasn't look back since.

I'm not really familiar with the status of django-tastypie right now but from what I see from the other comments it probably is better than tastypie.

Also please notice that I wanted to include one of each kind of package in the list since it's the actual list of packages I'm going to use when I need a feature - so there's no reason to include both DRF and tastypie (yes, django-simple-history and django-reversion were both included but as I explain in the article they have different usage models).