ty
An extremely fast Python type checker and language server written in Rust.
Repository Health
Technical Analysis
ty is a Python type checker and language server written in Rust by Astral, the team behind uv and Ruff. It performs static type analysis across large Python codebases in a fraction of the time of existing checkers, and doubles as a language server so editors get real-time diagnostics, hovers, and go-to-definition powered by the same engine.
Distributed on PyPI as ty, it installs as a standalone binary with no Python runtime dependency for the checker itself. It is designed as a modern, high-performance alternative to tools like mypy and Pyright, sharing infrastructure with the Ruff project and currently developed in an open beta.
What You Get
- A fast
ty checkcommand for static type checking of Python projects - A built-in language server for editor diagnostics, hovers, and navigation
- A standalone Rust binary installable via pip, uv, or the Astral installers
- Incremental, cache-aware analysis tuned for large codebases
- Configuration through pyproject.toml alongside the rest of the Astral toolchain
Common Use Cases
- Type-checking a Python codebase in CI far faster than mypy or Pyright
- Powering real-time type diagnostics in an editor via the language server
- Adopting a single fast toolchain (uv + Ruff + ty) across a project
- Catching type errors incrementally during local development
Under The Hood
Architecture - The ty distribution repo is a thin release/packaging shell (pyproject.toml, dist-workspace.toml, Dockerfile, docs, and a vendored ruff reference) around the actual type-checker engine, which is implemented in Rust within Astral’s shared Ruff/red-knot analysis infrastructure. It builds a standalone binary that runs both as a CLI (ty check) and an LSP server (ty server).
Tech Stack - The engine is Rust; this repo carries Python packaging fixtures, shell release scripts, a Dockerfile, uv for environment management, and MkDocs for documentation. Distribution is handled via cargo-dist (dist-workspace.toml) and PyPI wheels wrapping the binary.
Code Quality - The project is very actively developed (~40 commits/month, backed by Astral) with a maintained CHANGELOG, SECURITY policy, benchmarks (BENCHMARKS.md), and CI. As a beta it iterates quickly, but the shared Ruff heritage brings a mature, well-tested analysis core.
API Design - The CLI surface is minimal and predictable (ty check, ty server) and configuration reuses pyproject.toml conventions familiar from Ruff and uv, so adoption for anyone already in the Astral ecosystem is nearly frictionless.
Used by 2 apps in this directory
Morphik
AI Development · Search · Databases
Morphik is an AI-native ingestion and retrieval engine that lets developers store, search, and reason over visually rich documents — scanned PDFs, manuals, slides, and video — without duct-taping together OCR, an embedding model, and a vector database.
PrivateGPT
AI Development
The open-source API layer that turns local LLMs into production private AI applications with full Claude API compatibility