djangorestframework-types
Type stubs for Django Rest Framework
Decision gist · record as of 2026-08-14
Yes, if you use Django Rest Framework and want static type checking. The low install friction, permissive license, and multi-checker support make it practical. However, the aging maintenance status (673 days since last release) means you should verify that type coverage matches your Django Rest Framework version before committing to it in a new project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; intended for use with a static type checker like mypy or pyright
- Low install friction with a single lightweight dependency (typing_extensions).
- Maintenance status is aging—last release was 673 days ago, though the repository remains active.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2024-10-10 (673 days) · last repo commit 2025-12-12 · 55 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 379,713 downloads/mo, #7,109 on PyPI
Alternatives
Verify before relying
pip install djangorestframework-types
import typing_extensions
# Type stubs are now available for Django Rest Framework type checking- Whether type coverage is comprehensive across all Django Rest Framework versions and APIs
- Compatibility with the latest Django Rest Framework releases and whether stubs are kept in sync
- Whether pyright and other non-mypy checkers work as well as claimed compared to the original version
What it is and what it does
This package provides type stubs for Django Rest Framework, the popular REST API toolkit for Django. Type stubs are interface definitions that allow static type checkers like mypy and pyright to understand the types of Django Rest Framework's classes and functions, enabling developers to catch type errors during development rather than at runtime.
The package was forked from djangorestframework-stubs specifically to remove the mypy plugin dependency, which could crash when Django configuration issues arose. By providing pure stubs instead, it works with multiple type checkers—not just mypy—and avoids the fragility of plugin-based type checking. It has a single runtime dependency on typing_extensions and supports Python 3.8 through 3.12.
Use it for
- Add type checking to Django Rest Framework projects using mypy or pyright without installing a mypy plugin
- Catch serializer, viewset, and API endpoint type errors during development before deployment
- Enable IDE autocomplete and type hints for Django Rest Framework classes and methods
- Migrate from an older type-stub package to a plugin-free alternative that works with multiple type checkers
- Ensure type safety in REST API views and serializers across a team's codebase
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use Django Rest Framework and want static type checking.
The low install friction, permissive license, and multi-checker support make it practical. However, the aging maintenance status (673 days since last release) means you should verify that type coverage matches your Django Rest Framework version before committing to it in a new project.
Install
djangorestframework-types on PyPI
Before you install
Low install friction with a single lightweight dependency (typing_extensions). Maintenance status is aging—last release was 673 days ago, though the repository remains active.
Requires Python 3.8 or later; intended for use with a static type checker like mypy or pyright
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install djangorestframework-types
import typing_extensions
# Type stubs are now available for Django Rest Framework type checking
Verify before relying
- Whether type coverage is comprehensive across all Django Rest Framework versions and APIs
- Compatibility with the latest Django Rest Framework releases and whether stubs are kept in sync
- Whether pyright and other non-mypy checkers work as well as claimed compared to the original version
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping_extensions |
| Maintenance | Aging 673 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 379,713 / month, #7,109 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: djangorestframework_types-0.9.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django rest framework type stubs”
- djangorestframework-typesProvides type stubs for Django Rest Framework, enabling static type…
- djangorestframework-stubsProvides PEP-484 type stubs for Django REST Framework to enable mypy…
- djangorestframework-xmlAdds XML parsing and rendering support to Django REST Framework,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Quality Assurance packages
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.
pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.
Install it if your test suite takes long enough that parallelization would save meaningful time.
Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.
Install it if you work with CloudFormation templates.
See also django-types · djangorestframework-stubs · celery-types · django-stubs · django-stubs-ext · pandas-stubs · types-mypy-extensions · types-boltons · types-cffi · msgpack-types