Skip to content

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

Since ty is made by Astral, the team behind uv, the recommended way to install it is with uv. Run ty without installing it:

Language: Shell
$ uvx ty check

Add it to a project as a development dependency:

Language: Shell
$ uv add --dev ty

Or install it globally as a standalone tool:

Language: Shell
$ uv tool install ty@latest

Alternatively, install ty into an active virtual environment with pip:

Language: Windows PowerShell
PS> py -m pip install --user ty
Language: 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:

Language: Shell
$ ty check

Check specific paths:

Language: Shell
$ ty check src/ tests/

Watch for changes and recheck related files:

Language: Shell
$ ty check --watch

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

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

Configure once in your project:

Language: 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 July 6, 2026