$npx skillfedfor your agent

django-types

Type stubs for Django

Worth itPyPI Application FrameworksReleased Apr 20261.1M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_types-0.24.0-py3-none-any.whl
v0.24.0 · released 2026-04-22 · Python >=3.10 · 1 runtime deps: types-psycopg2

Yes. django-types is actively maintained, has no known vulnerabilities, low install friction, and is essential for any Django project using static type checking. The MIT license is permissive. Install it if you use type checkers with Django; it's a standard practice for modern Django development.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • QuerySet and Manager generics do not support subscripting at runtime; use string annotations or django_stubs_ext.monkeypatch() as a workaround.
  • Low install friction with a single runtime dependency (types-psycopg2).

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

last release 2026-04-22 (114 days) · last repo commit 2026-06-23 · 341 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,069,134 downloads/mo, #4,409 on PyPI

Verify before relying

pip install django-types

# In your Django model:
from typing import Optional
from django.db import models

class User(models.Model):
    team_id: Optional[int]
    team = models.ForeignKey('Team', null=True, on_delete=models.SET_NULL)
  • Whether type coverage is complete for all Django ORM features and edge cases
  • Performance impact of type checking with these stubs on typical Django projects
Same gist for agents: .md · .json

What it is and what it does

django-types is a type stub package that adds static type information for Django, enabling type checkers like mypy and pyright to understand Django's API. It was forked from django-stubs specifically to remove the mypy plugin dependency, which means it works with multiple type checkers and avoids crashes caused by Django configuration issues.

The package helps developers annotate Django models, querysets, managers, and HTTP request objects with proper types. It includes guidance for common patterns like foreign key relationships, related managers, and authenticated request handlers. Since Django's ORM classes don't support runtime subscripting (e.g., QuerySet[MyModel]), the stubs document workarounds using string annotations or a companion monkeypatch utility.

Use it for

  • Add type hints to Django ORM models so foreign keys and related managers are properly typed for IDE autocomplete and type checking
  • Enable pyright or other non-mypy type checkers to validate Django code without plugin crashes
  • Annotate view functions with typed HttpRequest subclasses to enforce authentication requirements at the type level
  • Catch type errors in Django querysets and manager calls during development rather than at runtime

Worth the install?

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

Worth it

Yes.

django-types is actively maintained, has no known vulnerabilities, low install friction, and is essential for any Django project using static type checking. The MIT license is permissive. Install it if you use type checkers with Django; it's a standard practice for modern Django development.

Install

django-types on PyPI

Before you install

Low install friction with a single runtime dependency (types-psycopg2). Actively maintained with recent releases; last commit 2026-06-23 and latest release 2026-04-22.

Requires Python 3.10 or later. QuerySet and Manager generics do not support subscripting at runtime; use string annotations or django_stubs_ext.monkeypatch() as a workaround.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install django-types

# In your Django model:
from typing import Optional
from django.db import models

class User(models.Model):
    team_id: Optional[int]
    team = models.ForeignKey('Team', null=True, on_delete=models.SET_NULL)

Verify before relying

  • Whether type coverage is complete for all Django ORM features and edge cases
  • Performance impact of type checking with these stubs on typical Django projects

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
types-psycopg2
MaintenanceActively maintained 114 days since the last release
Last repo commit
First released
Downloads1,069,134 / month, #4,409 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: django_types-0.24.0-py3-none-any.whl

Tags

Capabilities
django type stubsdjango type checkingdjango mypy typesdjango pyright supportdjango static typingdjango type hintsdjango orm type annotations
Topics
type-stubsdjangostatic-typing
PyPI keywords
djangomypystubstypes

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 stubs”

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 · djangorestframework-types · msgpack-types · pytest-mypy-plugins · django-stubs-ext · celery-types · pyre-extensions · types-SQLAlchemy · tightwrap · types-Flask-SQLAlchemy