Skip to main content

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.0.

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.1.0 with django-stubs 6.0.6: all 82 of 82 in-scope reference outcomes match. The exact behavior is in the compatibility map. It is generated by running both checkers against the same 82 assertions and is reproduced in CI. Hand-assigned statuses and weights are not used.

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 tests/test_compatibility_value.py tests/test_evaluate_differential_conformance.py
bash scripts/differential-conformance.sh --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.0.6
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.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-ty 0.3.1
File Size Uploaded
django_ty-0.3.1.tar.gz 559.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-ty 0.3.1
File Interpreter ABI Platform
django_ty-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / django_ty-0.3.1.tar.gz

Download URL django_ty-0.3.1.tar.gz
Size 559.9 kB
Tags Source
SHA-256 checksum
How to use checksums
84e0b31936a5b946faed4d2110d686ba347e4e79b6ea1c48d435107e1a67abfe
BLAKE2b-256 checksum
How to use checksums
000e028fcbb6d8fc9d6db1056c6fe6f29a4799584e2414d39c9a61003e5439d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","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.3.1-py3-none-any.whl

Download URL django_ty-0.3.1-py3-none-any.whl
Size 757.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8ad5ea074ffb80fd0af4491a87781590ca138648fd6cb7ad9f2cbb8ac2f06d6
BLAKE2b-256 checksum
How to use checksums
a8923d6091163bdb0c661b17a05f8d830b17fb904ea96317d92b9ae24a3c1f82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","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 history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page