Tools/typeddjango/django-stubs

django-stubs

PEP-484 stubs for Django

2.0k+3/wkemergingPythonMIT Licensetrending

The Lens

By Erik Loyd, SaaS CEO and former COO/CFO of an AWS Premier Partner.

Updated Jun 2026

Django leans hard on runtime magic. Models grow attributes you never declared, managers appear out of nowhere, Meta options reshape classes on the fly. That magic is also why a plain type checker throws up its hands on Django code. django-stubs is the fix: a full set of type hints plus a mypy plugin that actually understands the ORM, so your editor and your CI can catch a wrong field name or a bad query before it ships.

Setup is trivial. It is a dev dependency you pip install and a few lines of mypy config. Nothing to host, nothing to run in production. It tracks current Django and Python versions, and there is a sibling project, djangorestframework-stubs, if you live in DRF.

The whole thing is MIT and completely free. There is no paid tier and nothing gated. Solo devs, small teams, large teams: same deal, install it and move on. On Pyright instead of mypy you already get a lot of Django typing for free, so the value here is highest for mypy shops.

The catch is the coupling. The mypy plugin is tied to specific mypy and Django versions, so a major upgrade on either side can mean waiting for the stubs to catch up before your type check goes green again.

Free vs Self-Hosted vs Paid

fully free

Free / self-hosted: Everything. It is an MIT-licensed dev dependency you install with pip. No server, no account, no usage limits.

Paid: None. There is no commercial tier and no gated features. The project takes optional sponsorship through Open Collective, but nothing is held back for sponsors.

Completely free and open source. No paid tier.

Self-hosting ops:trivial

Get tools like this every Wednesday

One featured tool, three on the radar. No fluff.

Score
74/100 · B+
Adoption13/30
Maintenance25/25
Community11/20
License15/15
Analysis10/10

A low score is not a verdict on quality. Young and niche tools start low by design. How we calculate scores

Trust Signals

Community discussions enabledOrganization account (6 public repos)Author also built: typeddjango/awesome-python-typing (1,958 stars)

License: MIT License

Use freely, including commercial. Just keep the license.

Commercial use: ✓ Yes

About

Owner
TypedDjango (Organization)
Stars
1,961
Forks
564

Also by TypedDjango

Explore Further

More tools in the directory