ty

An extremely fast Python type checker and language server written in Rust.

Tool
PyPI
v0.0.73
19,491stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
85/100Excellent
Development Activity100
Maintenance100
Community60
Maturity40
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
89/100Excellent
Architecture90
Code Quality90
Innovation92
Learning Curve85

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 check command 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.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search