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

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.0
File Size Uploaded
django_ty-0.3.0.tar.gz 558.0 kB Details

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / django_ty-0.3.0.tar.gz

Download URL django_ty-0.3.0.tar.gz
Size 558.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bd46ad18cb2c56fec5b85552490e74e296b665a494c3693b2e1039b23d2014a8
BLAKE2b-256 checksum
How to use checksums
faa941342aa1042a267e3034cd82491de6e87776c4d13d0f2729f3b166296a0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.0-py3-none-any.whl

Download URL django_ty-0.3.0-py3-none-any.whl
Size 756.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d40a6a7767df0e98481e292043c9b8973c249081b49b558afc30076a0d6da81
BLAKE2b-256 checksum
How to use checksums
b3c93495e5a22c790eeeebf3e2e7991f9044cdcd789d305ee5eb1b24fb0eb371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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

0.3.1

2 release files

This release

0.3.0 This release

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