Install & Compatibility
Where this runs
tested against v0.15.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Api
✓ from tastypie.api import Api
✗ from tastypie.api import Api
Resource
✓ from tastypie.resources import Resource
VERSION
✓ from tastypie import VERSION
Minimal setup: define a ModelResource, register it on an Api instance, and include the urls.
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')
import django
django.setup()
from tastypie.api import Api
from tastypie.resources import ModelResource
from myapp.models import MyModel
class MyModelResource(ModelResource):
class Meta:
queryset = MyModel.objects.all()
resource_name = 'mymodel'
allowed_methods = ['get', 'post', 'put', 'delete']
authentication = ApiKeyAuthentication()
authorization = DjangoAuthorization()
api = Api(api_name='v1')
api.register(MyModelResource())
# Then include in urls.py as: urlpatterns = [path('api/', include(api.urls))]
Upgrade
Version history
0.15.1latest on PyPI · released Feb 23, 2025
Audit
Dependencies
DjangorequiredCore dependency, tested with Django 2.2+ but works with later versions.
python-dateutilrequiredUsed for date/time serialization.
mimeparserequiredUsed for content-type negotiation.