django-tastypie
A flexible & capable API layer for Django.
What it is and what it does
django-tastypie is a REST API framework for Django that automatically exposes your models as HTTP resources with full CRUD support. You define a Resource class pointing to a Django model, register it with an Api object, and wire it into your URLs—django-tastypie then handles serialization, deserialization, authentication, caching, and HTTP semantics. It treats XML, JSON, and YAML as first-class formats rather than afterthoughts, and supports deep relational queries and custom authentication schemes.
The framework is designed around explicit, flexible configuration rather than magic: you control what gets exposed, how it's serialized, and what operations are allowed. It has been actively used in production since 2010 and remains maintained, though it's positioned as beta. Installation requires python-dateutil and python-mimeparse as core dependencies, with optional libraries for XML and YAML support.
Use it for:
- Build a read-write REST API for a Django model without writing serializers or view logic.
- Expose related model data through nested API endpoints with automatic filtering.
- Serve the same data in multiple formats (JSON, XML, YAML) from a single resource definition.
- Add HTTP Digest authentication or custom auth schemes to API endpoints with minimal configuration.
- Cache API responses and implement throttling to protect backend resources from overuse.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
django-tastypie provides a REST API framework for Django that automatically generates read-write APIs from your models, with built-in support for JSON, XML, and YAML serialization.
Yes, if you need a lightweight, format-agnostic REST API for Django models and prefer explicit configuration over convention. The active maintenance, permissive license, and lack of known vulnerabilities make it production-safe. High install friction and beta status are minor concerns; the real question is whether django-tastypie's philosophy fits your project.
Install
django-tastypie on PyPI
pip
pip install django-tastypieuv
uv add django-tastypiepoetry
poetry add django-tastypieInstalling django-tastypie
Before you install
High install friction due to two runtime dependencies (python-mimeparse and python-dateutil) plus optional format support libraries. Actively maintained with recent commits and 3947 GitHub stars; last release was February 2025 and the repository remains active.
License in practice
Permissive BSD license allows commercial and private use with minimal restrictions, making it suitable for most production deployments.
Quickstart
pip install django-tastypie
from tastypie.resources import ModelResource
from tastypie.api import Api
class EntryResource(ModelResource):
class Meta:
queryset = Entry.objects.all()
v1_api = Api(api_name='v1')
v1_api.register(EntryResource())
Requires Django 4.2 (LTS) or Django 4.0+ and Python 3.8+; XML/YAML support requires optional dependencies (lxml, defusedxml, pyyaml).
Verify before relying
- Whether the beta status (Development Status :: 4 - Beta) reflects active development or stability concerns in production use.
- Performance characteristics and scalability limits for large datasets or high-traffic APIs.
- Comparison to modern alternatives in terms of feature parity and community adoption.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | 2 — python-mimeparse, python-dateutil |
| Maintenance | actively maintained — 537 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 125,489/month — #11,812 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_tastypie-0.15.1.tar.gz
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
djangorestframework-xmlAdds XML parsing and rendering support to…
permissive · top 15,000 on PyPI
djangorestframework-simplejwtProvides JSON Web Token (JWT) authentication…
permissive · top 5,000 on PyPI
django-upgradeAutomatically modernizes Django project code by…
permissive · top 15,000 on PyPI
flask-appbuilderFlask App Builder is a framework that generates…
permissive · top 5,000 on PyPI
django-haystackHaystack provides a unified search API for…
permissive · top 15,000 on PyPI
slumberSlumber wraps the requests library to provide…
unclear · top 15,000 on PyPI
jasonProvides lightweight helper functions for…
copyleft · top 15,000 on PyPI
sorl-thumbnailGenerates and caches image thumbnails for…
permissive · top 15,000 on PyPI
django-countriesProvides a Django model field for storing…
permissive · top 5,000 on PyPI
djangorestframework-yamlAdds YAML parsing and rendering support to…
permissive · top 15,000 on PyPI