$npx skillfedfor your agent

djangorestframework-stubs

PEP-484 stubs for django-rest-framework

With conditionsPyPI Quality AssuranceReleased Aug 20266.3M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — djangorestframework_stubs-3.18.0-py3-none-any.whl
v3.18.0 · released 2026-08-12 · Python >=3.10 · 3 runtime deps: django-stubs, typing-extensions, types-pyyaml

Yes, if you use Django REST Framework and mypy for type checking. The package is actively maintained, has no known vulnerabilities, and low install friction. It's essential for teams that want static type safety in DRF projects. Install it as part of your development dependencies and configure the mypy plugin in your mypy.ini.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; mypy must be configured with the mypy_drf_plugin.main plugin in mypy.ini for full type support.
  • Low install friction with a pure-wheel distribution.
  • Actively maintained with a release 2 days ago.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use this in commercial and private projects with minimal restrictions.

last release 2026-08-12 (2 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,340,396 downloads/mo, #1,926 on PyPI

Verify before relying

pip install djangorestframework-stubs

Add to mypy.ini:
[mypy]
plugins =
    mypy_drf_plugin.main
  • Whether the plugin handles all serializer patterns or has known gaps in type inference.
  • Performance impact of the mypy plugin on type-checking speed for large projects.
  • Specific version compatibility with different versions of django-stubs and typing-extensions.
Same gist for agents: .md · .json

What it is and what it does

djangorestframework-stubs is a collection of type stubs that teach mypy how to understand Django REST Framework's type signatures. It bridges the gap between DRF's dynamic nature and Python's static type system, allowing you to catch type errors at development time rather than runtime.

The package works by providing stub files (.pyi) that describe DRF's public API in terms mypy understands, plus a mypy plugin that enhances inference for common patterns. You install it alongside your project's type-checking setup, configure mypy to load the plugin, and then annotate your code with generic type parameters to get precise type information for model instances and method signatures. It depends on django-stubs, typing-extensions, and types-pyyaml.

Use it for

  • Catch type errors in CI/CD before deployment by running mypy on code using Django REST Framework.
  • Get IDE autocomplete and type hints when writing custom methods and validators.
  • Ensure serializer subclasses correctly type-hint their related model class to prevent Any inference.
  • Validate that view methods receive and return the correct types.
  • Migrate a Django REST Framework codebase toward full type safety incrementally.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use Django REST Framework and mypy for type checking.

The package is actively maintained, has no known vulnerabilities, and low install friction. It's essential for teams that want static type safety in DRF projects. Install it as part of your development dependencies and configure the mypy plugin in your mypy.ini.

Install

djangorestframework-stubs on PyPI

Before you install

Low install friction with a pure-wheel distribution. Actively maintained with a release 2 days ago. Requires Python 3.10 or later and depends on django-stubs, typing-extensions, and types-pyyaml.

Requires Python 3.10 or later; mypy must be configured with the mypy_drf_plugin.main plugin in mypy.ini for full type support.

License in practice

MIT license is permissive; you can use this in commercial and private projects with minimal restrictions.

Quickstart

pip install djangorestframework-stubs

Add to mypy.ini:
[mypy]
plugins =
    mypy_drf_plugin.main

Verify before relying

  • Whether the plugin handles all serializer patterns or has known gaps in type inference.
  • Performance impact of the mypy plugin on type-checking speed for large projects.
  • Specific version compatibility with different versions of django-stubs and typing-extensions.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
django-stubstyping-extensionstypes-pyyaml
MaintenanceActively maintained 2 days since the last release
First released
Downloads6,340,396 / month, #1,926 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Framework :: DjangoLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Evidence: djangorestframework_stubs-3.18.0-py3-none-any.whl

Tags

Capabilities
mypy stubs django rest frameworktype checking drfdjangorestframework type hintsstatic typing django restdrf mypy plugindjango rest framework stubs
Topics
type-checkingmypy-plugin

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 › “type checking drf”

Give your agent the search over MCP, or paste the wish link into any chat.

More Quality Assurance packages

coverage Worth it
PyPI · Testing · released Aug 2026

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.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
ruff Worth it
PyPI · Python Modules · released Aug 2026

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.

MITcompiled wheel · 3.7+
316.1Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
black Worth it
PyPI · Python Modules · released May 2026

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.

MITpure Python · 3.10+
179.9Mdownloads / mo
pytest-xdist Worth it
PyPI · Utilities · released Jul 2025

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.

MITpure Python · 3.9+
177.1Mdownloads / mo
cfn-lint Worth it
PyPI · Quality Assurance · released Aug 2026

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.

MIT-0pure Python
114.9Mdownloads / mo

See also djangorestframework-types · django-stubs · django-filter-stubs · djangorestframework-dataclasses · sqlalchemy2-stubs · djangorestframework-gis · drf-dynamic-fields · django-rest-polymorphic · drf-recaptcha · rest-framework-generic-relations