django-tastypie: a model-first REST layer for Django, still shipping in 2026
Creating delicious APIs for Django apps since 2010.
At a glance
- What is it?
- django-tastypie maps Django models to read-write REST endpoints with JSON, XML and YAML treated as equals. It is a deliberate alternative to Django REST Framework, and its trade-offs are just as deliberate.
- Who is it for?
- Adopt django-tastypie when you want a ModelResource per model, XML or YAML output that is not an afterthought, and a codebase you can read end to end without learning a serializer DSL. Do not adopt it for a greenfield project that expects a large hiring pool, first-party async support or a long-lived ecosystem of third-party packages; Django REST Framework owns that space.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 121 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- django-tastypie/django-tastypie3,942 ★ · -4
| Repository | 2026-09-24 | 2026-11-24 |
|---|---|---|
| django-tastypie/django-tastypie | 3.9k | 3.9k |
-4 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The problem django-tastypie solves, and who it is for
Django gives you models and a URLconf. It does not give you an HTTP API. django-tastypie fills that gap by letting you declare a resource class next to a model and registering it with an Api object, which then produces CRUD endpoints. The README frames the target audience through a list of reasons: you need an API that is RESTful and uses HTTP well, you want to support deep relations, and you do not want to write your own serializer to make the output right. That last point is the sharpest one. Tastypie's pitch is that the mapping from model to wire format should be configuration, not a second class hierarchy you maintain by hand.
The project has been public since 2010 and describes itself as being in beta while used in production on several sites. That is an unusual combination, and it should be read literally: the version numbers are still below 1.0, and the Development Status classifier in setup.py says Beta. If your organisation treats a 1.0 release as a procurement gate, that gate will not pass here. If your organisation treats a stable changelog and a working test suite as the gate, the picture is different. The last push to the default branch was on 2026-07-27, and the most recent tagged release is v0.15.1 from 2025-02-23, so the project is not abandoned, but it is also not moving quickly.
How a ModelResource turns a Django model into HTTP endpoints
The mechanism is a class you write that subclasses ModelResource and carries a Meta inner class. ModelResource reads the model's fields, builds a serializer from them, and wires the result to URL patterns generated by the Api container. The README's example is short enough to quote in full: a class EntryResource(ModelResource) with Meta.queryset set to Entry.objects.all(), registered on an Api(api_name='v1'), and included under r'^api/' in urlpatterns. The README states that this gets you a fully working, read-write API for the Entry model supporting all CRUD operations in a RESTful way.
Serialization is where the design diverges from most Django API tools. JSON support is there, but so are XML and YAML, and the README says XML is treated equally to JSON rather than as a bolt-on. That equality has a cost in dependencies: the format support section lists lxml 3 and defusedxml for XML, pyyaml for YAML, and biplist for binary plist. Those are optional, but if you enable XML you are pulling in a C-backed parser and a hardening library. Content negotiation is handled through python-mimeparse, which is a hard requirement in requirements.txt alongside python-dateutil. The whole dependency footprint is two required packages, which is small, and that smallness is part of the appeal for teams that audit their dependency trees.
Installing django-tastypie and serving your first resource
The README does not include an install command, but the repository ships a setup.py with the package name django-tastypie and a requirements.txt listing python-dateutil>=2.1 and python-mimeparse>=0.1.4. Install from PyPI under the distribution name:
pip install django-tastypieThen declare a resource next to the model you want to expose. The README gives this exact shape, with the queryset as the only required piece of configuration in the minimal case:
# myapp/api.py
from tastypie.resources import ModelResource
from myapp.models import Entry
class EntryResource(ModelResource):
class Meta:
queryset = Entry.objects.all()Register it on an Api object and mount that under a URL prefix. The README uses re_path, which matters if you are copying from older tutorials that still show url():
# urls.py
from django.urls.conf import re_path, include
from tastypie.api import Api
from myapp.api import EntryResource
v1_api = Api(api_name='v1')
v1_api.register(EntryResource())
urlpatterns = [
re_path(r'^api/', include(v1_api.urls)),
]After this, the endpoints under /api/v1/ respond to GET, POST, PUT, PATCH and DELETE for the Entry model. If you want XML output, add lxml and defusedxml; for YAML, add pyyaml. The README does not document what happens on a failed migration or a schema change, so plan to test resource behaviour yourself after altering a model.
Where django-tastypie is the wrong tool
The beta label is not decoration. The README says the project is currently in beta, and setup.py carries the matching classifier, which means the maintainers have not committed to API stability in the way a 1.x release would imply. A repository file named BACKWARDS-INCOMPATIBLE.txt sits at the top level, which tells you the project has a history of breaking changes serious enough to warrant their own changelog file.
There are practical limits too. The README's requirements section pins the supported Django line to 4.2 as the LTS option plus 4.0 and above including 5.0 and 5.1, while the classifiers in setup.py also list Django 5.2. Those two sources are not identical, so check the classifier list against your installed Django before assuming support. Python support starts at 3.8. If you are running an older Django or an older Python, this is not the framework for you.
The security policy is worth reading before you deploy anything. The README asks that security holes not be filed as GitHub issues and instead be emailed to [email protected]. That is a reasonable process, but it means vulnerability reports do not appear in the public issue tracker, so you cannot gauge the project's responsiveness to security work by browsing issues. For a team that wants to see a public CVE history before adopting an API layer, that opacity is a real drawback.
django-tastypie vs Django REST Framework: the actual difference
The comparison people search for is django-tastypie vs rest framework, and the difference is not cosmetic. Django REST Framework is built around explicit Serializer classes: you define fields, validation and representation in a class that is separate from the model, and views or viewsets consume that serializer. Tastypie inverts this. ModelResource introspects the model and derives the serialization, so the resource class is thin and the model remains the single source of truth for field shape. That is why the README lists "you DON'T want to have to write your own serializer to make the output right" as a reason to choose it.
The second difference is format policy. DRF's ecosystem is JSON-first in practice, with XML available through a renderer. Tastypie treats XML as a first-class format with its own dependencies and its own documentation weight, and adds YAML and binary plist. If you are integrating with a system that speaks XML, that is a genuine reason to pick tastypie over DRF, and it is probably the strongest one left.
The third difference is scale of ecosystem. DRF has a large set of third-party authentication, filtering and documentation packages. Tastypie's own repository includes contrib packages for GIS and contenttypes, and that is roughly the extent of what the project itself ships. Anything beyond that you build yourself. The README also points to an IRC channel, #tastypie on irc.freenode.net, as a support route, which is a signal about the size of the community you are joining.
Maintenance cadence, licensing and upgrade cost
The last push was on 2026-07-27, so the repository is not dormant. Releases are slower: v0.15.1 landed on 2025-02-23, v0.15.0 on 2024-11-20, and v0.14.7 on 2024-04-23. That is roughly one or two tagged releases a year, which is enough for a stable dependency but not enough to expect a fix for a niche bug within a sprint. Plan upgrades around the release tags rather than around the branch.
Licensing needs care. The repository's LICENSE file is present, and setup.py carries the classifier 'License :: OSI Approved :: BSD License', but the repository metadata reports the licence as NOASSERTION. Those two statements do not agree, and the disagreement is the kind of thing that matters when a legal review asks what terms apply. Read the LICENSE file directly rather than trusting either the classifier or the metadata field. This is not legal advice, and the answer will depend on your organisation's policy.
Upgrade cost is shaped by the beta status and by BACKWARDS-INCOMPATIBLE.txt. Read that file before bumping versions, because a minor version number in a 0.x project does not carry the same promise it would in a 1.x project. The dependency list is short enough that conflicts are unlikely, but python-mimeparse has an exclusion in setup.py (>= 0.1.4, != 1.5) that exists for a reason, so do not override it in your own requirements file.
Editorial conclusion
Adopt django-tastypie when you want a ModelResource per model, XML or YAML output that is not an afterthought, and a codebase you can read end to end without learning a serializer DSL. Do not adopt it for a greenfield project that expects a large hiring pool, first-party async support or a long-lived ecosystem of third-party packages; Django REST Framework owns that space. Before committing, verify that your Django version appears in the classifiers in setup.py, that the resource you need does not fall into the areas the documentation leaves thin, and that the maintenance cadence of the last release fits your upgrade window.
Frequently asked questions
What is django-tastypie?
It is a Python library that creates RESTful APIs for Django applications by mapping models to resource classes. The README describes it as creating delicious APIs for Django apps since 2010, and says it is currently in beta but used in production on several sites.
How do I install django-tastypie?
The README does not give an install command, but the repository ships a setup.py with the distribution name django-tastypie, so it installs from PyPI with pip install django-tastypie. Its required dependencies, listed in requirements.txt, are python-dateutil>=2.1 and python-mimeparse>=0.1.4.
Which Django and Python versions does django-tastypie support?
The README's requirements section lists Python 3.8+ and Django 4.2 as the LTS option plus Django 4.0 and above including 5.0 and 5.1. The classifiers in setup.py additionally list Django 5.2, so check those classifiers against your installed Django before assuming support.
How does django-tastypie differ from Django REST Framework?
Tastypie derives serialization from the model through ModelResource, so you do not write a separate serializer class, whereas Django REST Framework is built around explicit Serializer classes. Tastypie also treats XML as a first-class format alongside JSON and YAML, with lxml, defusedxml and pyyaml as optional dependencies for those formats.
How do I report a security issue in django-tastypie?
The README asks that you do not open a GitHub issue for a security hole and instead email [email protected] so the maintainers can investigate and announce a solution along with the vulnerability.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/django-tastypie-django-tastypie)Star history chart for your README
[](https://hysenlabs.com/projects/django-tastypie-django-tastypie)Was this useful?