Astral releases ty 1.0, a high-performance Python type checker
Astral has launched ty 1.0, a Rust-based Python type checker that offers significant speed improvements and new migration tools for large codebases.
Astral has officially released version 1.0 of ty, a Python type checker and language server built in Rust. This milestone marks the tool’s transition from beta to a production-ready state, following rapid adoption across the Python ecosystem and extensive internal use at OpenAI.
What happened
The release establishes ty as a direct alternative to established tools like mypy, Pyright, and Pyrefly. Astral reports that ty is now the default type checker at OpenAI, where it handles millions of lines of critical Python code. During their internal migration, the team observed a median 24x speedup in checking times and a 73% reduction in peak memory usage compared to their previous solution.
Adoption metrics indicate strong momentum. Between October 2025 and October 2026, PyPI downloads for ty grew 29 times. A recent audit of the 25,000 most-downloaded PyPI packages showed that 11.6% of repositories using a type checker had adopted ty, placing it third behind mypy and Pyright. Among repositories created in the last year, that figure rises to 22.6%, suggesting strong traction among new projects.
Performance benchmarks on an M3 Max machine demonstrate ty’s speed advantage. It was the fastest checker on 16 out of 18 tested ecosystem projects, averaging 1.46x faster than Pyrefly and 3.56x faster than Zuban. In editor scenarios, ty’s language server updated diagnostics 7.73x faster than Pyrefly and 3.22x faster than Zuban on average, leveraging its architecture designed for fine-grained incrementality.
How it works
Ty is built on gradual and set-theoretic typing principles, aiming to balance precision with practical usability. Its core architecture prioritizes incrementality, allowing it to re-check only affected parts of the codebase when changes occur. This design enables the fast live updates required for a responsive language server experience.
The tool employs a novel generics solver and supports extensive bidirectional inference. This allows ty to infer precise types for containers and attributes even when explicit annotations are missing. For example, if a class attribute is assigned an integer in the initializer, ty infers that type for subsequent accesses and flags mismatches, such as assigning a string to that attribute later. This helps catch errors in lightly typed code without requiring exhaustive manual annotation.
Ty also introduces stricter defaults in some areas while relaxing others to reduce noise. It can detect unsound return statements, such as functions promising a list of strings but returning a list of any type, which other checkers might miss. Conversely, it relaxes rules for narrowing types after isinstance checks by default, accepting common patterns unless strict generic narrowing is explicitly enabled.
Key details
- Ty 1.0 is written in Rust and serves as both a command-line type checker and a language server.
- Internal benchmarks at OpenAI showed a median 24x speedup and 73% lower memory usage after migrating to ty.
- The tool supports PEP 723 standalone scripts via integration with uv, allowing dependency management for individual files.
- New migration commands include
--add-ignoreto suppress existing errors and--update-baselineto track diagnostics in a separate file. - Ty recorded only 14 false positives and 13 false negatives on the Python typing conformance suite, a significant improvement from its beta version.
- Strict mode features include warnings for unsound returns, such as returning
list[Any]whenlist[str]is expected.
Why it matters
For engineering teams managing large Python codebases, type checking speed directly impacts developer productivity. Slow feedback loops in editors or CI pipelines can discourage rigorous typing practices. Ty’s performance gains, particularly its incremental update capability, mean that developers receive instant feedback on type errors as they type, reducing context switching and friction.
The migration tools address a common barrier to adopting new static analysis tools: existing technical debt. By allowing teams to baseline current errors and focus only on new violations, ty enables gradual adoption without requiring a massive upfront cleanup effort. This approach makes it feasible for large organizations to switch tools without halting feature development.
Furthermore, ty’s deeper type inference capabilities help catch subtle bugs that looser checkers might miss. Detecting unsound returns or incorrect attribute assignments early prevents runtime errors in production. As Python projects grow in complexity, having a tool that enforces type safety without sacrificing speed becomes increasingly valuable for maintaining system reliability.
What you can do
- Install ty using the command
uv tool install ty@latestto try it on your current project. - Run
ty check --add-ignoreon an existing codebase to automatically add suppression comments for current errors. - Use
ty check --update-baselineto create a baseline file, allowing CI to fail only on new type errors. - Enable script support by adding
project-manager.script = "uv"to your configuration if you use PEP 723 scripts. - Test strict generic narrowing by running
ty check -c analysis.strict-generic-narrowing=trueto see if it catches additional issues in your code. - Compare performance against your current type checker by running ty on a large module and measuring the execution time.



