--- id: djangorestframework-types version: "0.9.0" license: MIT license_treatment: permissive maintenance: aging --- # djangorestframework-types — Type stubs for Django Rest Framework License: permissive · Maintenance: aging · Downloads: 379.7K/mo ## 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 above — verify before relying. Provides type stubs for Django Rest Framework, enabling static type checking with mypy, pyright, and other type checkers without requiring a mypy plugin. 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 pip install djangorestframework-types uv add djangorestframework-types poetry add djangorestframework-types ## Installing djangorestframework-types 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. 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 Requires Python 3.8 or later; intended for use with a static type checker like mypy or pyright 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_current - Install friction: low - Maintenance: aging - Downloads: 379.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django rest framework type stubs, djangorestframework typing, drf type hints, static type checking django rest, mypy django rest framework, pyright django rest framework, type annotations drf, type-stubs, static-analysis, django-ecosystem [View on SkillFed](https://skillfed.io/packages/djangorestframework-types) · [View on PyPI](https://pypi.org/project/djangorestframework-types/)