# typeddjango/django-stubs

PEP-484 stubs for Django

Repository: https://github.com/typeddjango/django-stubs
Canonical: https://ross.abutalabs.com/products/django-stubs
Language: Python
License: MIT
License Family: permissive
Topics: mypy, django, python, python3, pep484, hacktoberfest
Last push: 2026-08-25T20:29:03+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 97, longevity 100
- inputs: {"age_days": 2957, "days_push": 8, "days_rel": 21, "gap_med": 22.5, "n_releases_24m": 25}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1970, forks 564 (observed 2026-08-28T04:06:00.820263+00:00)

## What it is
A collection of PEP-484/PEP-561 type stubs plus a custom mypy plugin that provides precise static typing and type inference for the Django framework. It works with mypy (full support) and offers basic support for pyright, pyrefly, and ty.

## Use cases
- add static type checking to a Django project with mypy
- get accurate type inference for Django ORM querysets and models
- type-check Django settings, managers, and class-based views
- catch type errors in Django code before runtime
- configure mypy plugin for a Django settings module

## When to choose
- you use Django with mypy and want precise types for Django's 'magic' patterns
- you want CI-checked stubs with clear Django/mypy/Python version compatibility
- you want a maintained, MIT-licensed typing solution for Django

## When to avoid
- your project does not use Django
- you rely primarily on pyright or another checker needing full stub fidelity (support is basic)
- you use a Django or mypy version outside the supported compatibility matrix

## Facets
- artifact type: library
- maturity: active
- function: type-system, developer-tools
- domain: web-development, developer-tools, programming-languages
- platform: python
- tags: django, mypy, type-stubs, static-type-checking, pep-561

## Member repositories
- typeddjango/django-stubs (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:00.820263+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:05:08.515637+00:00, confidence not recorded.
  - readme: https://github.com/typeddjango/django-stubs (fetched 2026-08-28T04:06:00.820263+00:00, sha df49fd55ec2f)
  - registry_pypi: https://pypi.org/pypi/django-stubs/json (fetched 2026-08-29T10:44:39.119443+00:00, sha 2d280202d48f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
