Guide · Open source
How to use ty: run the Python type checker and editor language server
Updated · written with AI from the project's own documentation and checked against our catalogue data
ty is an open-source Python type checker and language server, written in Rust and released under the MIT licence. It looks for type errors in your Python code before it runs, and its language server gives code editors completions, navigation and on-hover help. This guide shows you how to run it quickly with uvx, what it can do, and what its beta status means for your project.
Quick start
- 1Install uv. Install uv, since the README uses uvx to run ty without a permanent install. Follow uv's own documentation for your system.
- 2Go to your project folder. Open a terminal in the Python project you want to check.
- 3Run the type checker. Run uvx ty check to type check your code straight away.
- 4Read the diagnostics. Review the type errors ty reports and fix the ones that matter for your code.
- 5Set up your editor. Follow the editor integration guide at docs.astral.sh/ty/editors to add the language server to VS Code, PyCharm, Neovim or another supported editor.
- 6Tune rules if needed. Adjust rule levels, per-file overrides or suppression comments using the linked configuration and suppression docs.
What ty does
ty checks Python code for type errors, the kind of mistakes a type checker catches before the code runs. It is designed to be fast, and the project describes itself as an extremely fast Python type checker and language server.
It also ships a language server. Editors that talk to a language server can show completions, code navigation, auto-import, inlay hints and on-hover help while you write code.
- Type checking of Python code for type errors
- Language server with code navigation, completions, code actions, auto-import, inlay hints and on-hover help
- Editor integrations listed for VS Code, PyCharm and Neovim, among others
Run ty without a permanent install
The quickest way to start is to run ty with uvx, which is part of uv. You need uv installed first, because the README shows uvx as the way to run ty without a permanent install.
From your project directory, run the command below. It runs the type checker on your code.
uvx ty checkInstall ty permanently and set up your editor
To install ty for regular use, follow the installation documentation linked from the project README at docs.astral.sh/ty. The README points to that page rather than listing a permanent install command, so check it for the current method.
To add the ty language server to your editor, use the editor integration guide at docs.astral.sh/ty/editors. The README names VS Code, PyCharm and Neovim as supported integrations, plus others.
- Installation details: docs.astral.sh/ty/installation
- Editor setup: docs.astral.sh/ty/editors
- Try it in a browser first with the ty playground at play.ty.dev
Configure rules and suppress diagnostics
The README says ty supports configurable rule levels, per-file overrides and suppression comments. Diagnostics are described as comprehensive, with rich contextual information.
For the exact configuration keys and syntax, read the rules, configuration reference and suppression pages linked from the README. This guide does not list them, to avoid guessing.
- Rule levels: docs.astral.sh/ty/rules
- Per-file overrides: docs.astral.sh/ty/reference/configuration
- Suppression comments: docs.astral.sh/ty/suppression
Check which Python version ty targets
ty officially supports type checking code that targets Python 3.10 and later. Older targets, from Python 3.7 through 3.9, can still be selected but may produce false negatives or false positives.
The target version is independent of the Python version used to install ty. The README gives an example: ty installed from PyPI using Python 3.8 or later can type check code targeting Python 3.7.
- Officially supported targets: Python 3.10 and later
- Python 3.7 to 3.9: may give false negatives or false positives
Know ty's beta status before relying on it
The README says ty is currently in beta and does not yet have a stable API. It uses 0.0.x versioning, and breaking changes, including changes to diagnostics, may occur between any two versions.
If you need a stable, long-term API, this is a reason to wait or to choose a more mature tool. Report bugs or ask questions through the GitHub issues page, or join the Discord server linked in the README.
- Beta: the README says ty is currently in beta
- No stable API yet; breaking changes may happen between any two versions
- Report bugs: open an issue at github.com/astral-sh/ty/issues
What people use it for
- Checking a large Python project for type errors while you edit it
- Getting completions, navigation and on-hover help in an editor through the ty language server
- Trying a fast type checker on existing code that already uses type hints
- Running a type check in a team that already uses uv or Ruff from Astral
Frequently asked questions
Is ty free to use?
ty is licensed under the MIT license, which is an open-source licence. The README does not mention any paid tier, so you can use it under the terms of that licence.
How do I install ty?
The README shows uvx ty check as a way to run ty without a permanent install, and it links to docs.astral.sh/ty/installation for installation. Check that page for the current permanent install method.
Do I need uv to use ty?
The README's quick-start command uses uvx, which comes with uv, so uv is the prerequisite it names. The README does not list other requirements in the source provided.
Which Python versions does ty support?
ty officially supports checking code that targets Python 3.10 and later. Targets from Python 3.7 to 3.9 can still be selected, but may give false negatives or false positives.
Is ty stable enough for production use?
The README says ty is in beta, has no stable API yet, and may have breaking changes between any two versions, including to diagnostics. Teams that need a stable long-term API should weigh this before adopting it.
How does ty compare to mypy and Pyright?
The README claims ty is 10x to 100x faster than mypy and Pyright. Those are the comparable projects named here, and the README does not give further detail on the benchmark conditions, so test on your own code.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
ty suits Python developers who already use type hints and want fast checking, quick editor feedback, or a tool that matches uv and Ruff from Astral. It is a poor fit for teams that need a stable API or a fully mature tool, or for projects that target Python 3.7 to 3.9, since the README is clear about beta status and those older targets. For those cases, mypy or Pyright are the comparable options to consider.
Install options & downloads