Exposes Django models through a customizable REST interface with serialization, relations, and standard HTTP verbs.
Overview
Tastypie is a webservice API framework for Django that helps you create REST-style interfaces over your data. It aims to make exposing models straightforward while leaving control over what is published and how non-ORM sources are wired in.
A typical setup defines ModelResource classes, registers them on an Api object, and mounts URLs under an api prefix. The result supports read and write operations across CRUD-style endpoints with JSON, XML, and YAML serialization, HATEOAS-style links by default, and room to add authentication, caching, and related data.
It suits teams that want HTTP-oriented APIs with deep relations, serializers handled by the framework, and equal treatment of XML alongside JSON. It installs via pip, adds tastypie to INSTALLED_APPS, and integrates with third-party Django apps without modifying their source.
It has been used in production while still marked beta, and offers mailing list and IRC channels for support questions.
Key features
- GET POST PUT DELETE PATCH support
- ModelResource and Api registration
- JSON, XML, YAML serialization
- HATEOAS links by default
- Deep relation support
- Non-ORM data source hooks
- Designed for extension
- Third-party Django app compatibility
Use cases
- REST APIs over Django models
- Mobile or SPA backends on Django
- Multi-format API responses
- Exposing related model graphs