$npx skillfedfor your agent

django-stubs-ext

Monkey-patching and extensions for django-stubs

Worth itPyPI Application FrameworksReleased Aug 202612.1M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_stubs_ext-6.1.0-py3-none-any.whl
v6.1.0 · released 2026-08-12 · Python >=3.11 · 2 runtime deps: django, typing-extensions

Yes. If you use django-stubs for type checking, this package is essential—it's a lightweight, actively maintained companion that enables the type hints django-stubs provides to work correctly at runtime. Install it alongside django-stubs and call monkeypatch() once in your settings. No known vulnerabilities, permissive license, and minimal dependencies make it a safe addition.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later; call monkeypatch() once in your Django settings, not repeatedly.
  • Low install friction with only 2 runtime dependencies (django and typing-extensions).
  • Active maintenance with a release 2 days old.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.

last release 2026-08-12 (2 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 12,136,688 downloads/mo, #1,339 on PyPI

Verify before relying

pip install django-stubs-ext

import django_stubs_ext

django_stubs_ext.monkeypatch()
  • Whether the __class_getitem__ implementation handles all Django versions supported or only a subset.
  • Performance impact of the monkey-patching at application startup.
Same gist for agents: .md · .json

What it is and what it does

django-stubs-ext is a companion package to django-stubs that applies runtime monkey-patching to Django classes to support generic type hints. Django's built-in classes don't define the `__class_getitem__` method needed for proper typing with generic syntax, so this package adds that method at runtime. The package is designed to be called once during Django application initialization, typically in settings, and intelligently patches only the features needed for your specific Django version.

The package exists because django-stubs itself is a type-stub-only library that can't perform runtime modifications. By splitting the runtime extensions into a separate package, applications using django-stubs avoid needing mypy as a production dependency. The monkey-patching is minimal and safe—it adds a `__class_getitem__` method that returns the class itself, enabling type checkers to understand generic Django class usage without breaking runtime behavior.

Use it for

  • Enable type hints for Django generic classes in projects using django-stubs without mypy as a runtime dependency.
  • Support proper typing of Django QuerySet and Manager generics in IDE autocomplete and type checking.
  • Ensure compatibility across multiple Django versions by applying version-specific patches at runtime.
  • Integrate type safety into existing Django projects that rely on django-stubs for static type checking.

Worth the install?

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

Worth it

Yes.

If you use django-stubs for type checking, this package is essential—it's a lightweight, actively maintained companion that enables the type hints django-stubs provides to work correctly at runtime. Install it alongside django-stubs and call monkeypatch() once in your settings. No known vulnerabilities, permissive license, and minimal dependencies make it a safe addition.

Install

django-stubs-ext on PyPI

Before you install

Low install friction with only 2 runtime dependencies (django and typing-extensions). Active maintenance with a release 2 days old.

Requires Python 3.11 or later; call monkeypatch() once in your Django settings, not repeatedly.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.

Quickstart

pip install django-stubs-ext

import django_stubs_ext

django_stubs_ext.monkeypatch()

Verify before relying

  • Whether the __class_getitem__ implementation handles all Django versions supported or only a subset.
  • Performance impact of the monkey-patching at application startup.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
djangotyping-extensions
MaintenanceActively maintained 2 days since the last release
First released
Downloads12,136,688 / month, #1,339 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Framework :: DjangoFramework :: Django :: 5.2Framework :: Django :: 6.0Framework :: Django :: 6.1Operating System :: OS IndependentProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Evidence: django_stubs_ext-6.1.0-py3-none-any.whl

Tags

Capabilities
django type hints runtimedjango-stubs extensionsdjango generic class patchingdjango typing supportdjango __class_getitem__ monkey patch
Topics
django-typingtype-hintsmonkey-patching

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 type hints runtime”

  • django-stubs-extProvides runtime monkey-patching extensions for django-stubs to…
  • django-typesProvides type stubs for Django to enable static type checking with…
  • django-stubsProvides type stubs and a mypy plugin to enable precise static type…

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

More Application Frameworks packages

fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
textual Worth it
PyPI · Application Frameworks · released Jun 2026

Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.

Install it if you're developing CLI tools, dashboards, or interactive terminal applications.

MITpure Python
443.6Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
mcp Worth it
PyPI · Application Frameworks · released Jul 2026

Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.

Install it if you need to build or connect to servers.

MITpure Python · 3.10+
319.3Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo

See also django-stubs · django-types · djangorestframework-types · celery-types · django-htmx · patchy · grpc-stubs · forbiddenfruit · typish · pytest-stub