django-ty
django-ty adds Django ORM semantics to ty-extended. It installs Django,
the checker runtime, and a packaged Django static API for Django 5.0-6.1.
The tested compatibility matrix covering django-ty, ty-extended, Django, and
Python versions lives in
docs/DJANGO-VERSIONS.md.
Each Django line is probed against both the version-matched mypy +
django-stubs oracle and the shipped wheel.
Install
uv add django-ty
Installed plugin discovery is deliberately opt-in. Add this to the project configuration:
[tool.ty.plugins]
auto-discover = true
Then run:
uv run ty check .
No installer command, .ty directory, or file copy is needed.
Coverage
The complete pinned static API is packaged inside the wheel. No upstream
django-stubs, django-stubs-ext, or mypy-plugin distribution is installed.
Utilities supplied by django-stubs-ext, including WithAnnotations, are
intentionally outside django-ty's product surface. django-ty handles Django
model fields, forward and reverse relations, model-specific managers, queryset
result types, values(), values_list(), basic annotate(), and literal lookup
validation.
The measured feature parity is 100.0% against pinned mypy 2.3.1 with
django-stubs 6.1.1: all 86 of 86 in-scope reference outcomes match. The exact
behavior is in the
compatibility map.
It is generated by running both checkers against the same 86 assertions and is
reproduced in CI. Hand-assigned statuses and weights are not used.
The same corpus is also probed across all 18 supported Django/Python pairs from Django 5.0 through 6.1 in the version compatibility matrix: the candidate satisfies the corpus contract on all probed versions, and per-version oracle differences are itemized where older django-stubs releases validated less.
Development
uv run --no-project --python 3.11 python scripts/evaluate_django_stubs_coverage.py --check
uv run --no-project --python 3.11 python -m unittest discover -s tests
bash scripts/differential-conformance.sh --check
uv run --no-project --python 3.11 python scripts/probe_django_versions.py --check
cargo test --locked
cargo llvm-cov --locked --all-targets --summary-only --fail-under-lines 98
bash scripts/e2e.sh
To refresh the vendored static API from the reviewed pinned checkout:
uv run --no-project --python 3.11 python scripts/vendor_django_static_api.py --upstream-root /path/to/django-stubs-6.1.1
bash scripts/differential-conformance.sh --write
uv run --no-project --python 3.11 python scripts/evaluate_django_stubs_coverage.py --write --check
License
django-ty is licensed under the MIT License. By submitting a contribution for inclusion in django-ty, you agree that the contribution is licensed under the MIT License without additional terms or conditions.
Metadata
Release files for django-ty 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_ty-0.4.0.tar.gz | 580.6 kB | Without provenance | Details for django_ty-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_ty-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for django_ty-0.4.0-py3-none-any.whl |
Total release size: 1.3 MB
Release files / django_ty-0.4.0.tar.gz
| Download URL | django_ty-0.4.0.tar.gz |
|---|---|
| Size | 580.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42d58891c41cc428519c52ec2eacd555cd566afe6404b750e5feddcd1254fe38
|
|
BLAKE2b-256 checksum How to use checksums |
0d12c6161aef39e80bc648950de768060f5f26cd69750c098d5299e21c102a3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_ty-0.4.0-py3-none-any.whl
| Download URL | django_ty-0.4.0-py3-none-any.whl |
|---|---|
| Size | 768.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b415474b7fd940eac211eb00b80733bd9d2c50e7878602b2cdfda47b1d5d725a
|
|
BLAKE2b-256 checksum How to use checksums |
d5fa8229b53eddd5102c994d613487efb3b2f8eed44f78fc2ef9382ed4481679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for django-ty 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.