skillfed

django-tastypie

A flexible & capable API layer for Django.

django-tastypie v0.15.1 125.5K downloads/30d#11,812 on PyPI3,947
Permissive license Active released

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-tastypie

uv

uv add django-tastypie

poetry

poetry add django-tastypie

Installing 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

Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Utilities

Tags

django rest api frameworkdjango model api generatortastypie rest serializationdjango xml json yaml apidjango crud api builderdjango rest resource frameworkdjango api authentication caching
rest-apidjango-frameworkmulti-format-serialization

More Utilities packages