ty

ty is a fast static type checker and language server for Python, written in Rust and designed for quick feedback in editors and CI.

Installation and Setup

Install into an active virtual environment:

Windows PowerShell
PS> py -m pip install --user ty
Shell
$ python -m pip install ty

Key Features

  • Static analysis with a Rust core and parallel checking.
  • Editor integration through the Language Server Protocol with an official Visual Studio Code extension and documented Neovim and Zed setups.
  • Focused CLI with a watch mode for incremental checks and rapid feedback.
  • First-party and third-party import discovery from your Python environment, including automatic .venv and VIRTUAL_ENV detection.
  • Declarative configuration in pyproject.toml or ty.toml, including rule levels, source include and exclude globs, and target Python and platform settings.
  • CI-friendly output formats for GitHub and GitLab, plus exit-code control for pipelines.

Usage

Run type checks for the current project:

Shell
$ ty check

Check specific paths:

Shell
$ ty check src/ tests/

Watch for changes and recheck related files:

Shell
$ ty check --watch

Target a Python version and platform for resolution and rule selection:

Shell
$ ty check --python-version 3.12 --python-platform linux

Configure once in your project:

TOML
# pyproject.toml
[tool.ty]
python-version = "3.14"

[tool.ty.src]
include = ["src", "tests"]
exclude = ["src/generated"]

[tool.ty.rules]
redundant-cast = "ignore"
possibly-missing-import = "error"

Tutorial

Astral's ty: A New Blazing-Fast Type Checker for Python

Learn to use ty, an ultra-fast Python type checker written in Rust. Get setup instructions, run type checks, and fine-tune custom rules in personal projects.

intermediate tools

For additional information on related topics, take a look at the following resources:


By Leodanis Pozo Ramos • Updated Dec. 1, 2025