This package contains type stubs and a custom mypy plugin to provide more precise static types and type inference for Django framework. Django uses some Python "magic" that makes having precise types for some code patterns problematic. This is why we need this project. The final goal is to be able to get precise types for the most common patterns. We are independent from Django at the moment. There's a proposal to merge our project into the Django itself. You can show your support by liking the PR. This project does not affect your runtime at all. It only affects mypy type checking process. The current implementation uses Django's runtime to extract information about models, so it might crash if your installed apps or models.py are broken.

Features

  • Create a HttpRequest that's guaranteed to have an authenticated user
  • Safe to use in production
  • We rely on different django and mypy versions
  • pyproject.toml configurations are also supported
  • The final goal is to be able to get precise types for most common patterns
  • Fully working typed boilerplate can serve you as an example

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow pep484 stubs for Django

pep484 stubs for Django Web Site

Other Useful Business Software
Try Google Cloud Risk-Free With $300 in Credit Icon
Try Google Cloud Risk-Free With $300 in Credit

No hidden charges. No surprise bills. Cancel anytime.

Use your credit across every product. Compute, storage, AI, analytics. When it runs out, 20+ products stay free. You only pay when you choose to.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of pep484 stubs for Django!

Additional Project Details

Programming Language

Python

Related Categories

Python Software Development Software, Python Frameworks

Registered

2022-09-05