ty logo

ty Astral Software Inc.

Use this command to install ty:
winget install --id=astral-sh.ty -e

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

Primary Purpose: Ty is an advanced Python type checker and language server designed to enhance development efficiency by offering fast and precise type checking for Python projects. Built in Rust, Ty leverages this high-performance language to deliver superior speed compared to traditional tools.

Key Features:

  • Rust-Based Performance:_ty excels due to its implementation in Rust, ensuring rapid execution and efficient resource management.
  • Seamless Integration with uvx: Install and run Ty effortlessly using uvx, streamlining setup for developers.
  • Comprehensive File Scanning: Automatically checks all Python files within a directory or project, including subdirectories, ensuring thorough analysis.
  • Virtual Environment Detection: Identifies packages in the active virtual environment or .venv directory, simplifying dependency management.
  • Online Playground Access: Experiment with Ty's features without installation through an accessible online interface.

Audience & Benefit: Ideal for Python developers seeking a reliable tool to integrate into their workflow, Ty accelerates development by detecting errors early. This leads to more robust code and faster iterations, supporting efficient and error-free coding practices.

By incorporating these features, Ty serves as a valuable asset in modern Python development, enhancing productivity and project reliability.

README

ty

PyPI Discord

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

> [!WARNING] > > ty is in preview and is not ready for production use. > > We're working hard to make ty stable and feature-complete, but until then, expect to encounter bugs, > missing features, and fatal errors.

Getting started

Try out the online playground, or run ty with uvx to get started quickly:

uvx ty

For other ways to install ty, see the installation documentation.

If you do not provide a subcommand, ty will list available commands — for detailed information about command-line options, see the CLI reference.

Use the check command to run the type checker:

uvx ty check

ty will run on all Python files in the working directory and or subdirectories. If used from a project, ty will run on all Python files in the project (starting in the directory with the pyproject.toml)

You can also provide specific paths to check:

uvx ty check example.py

When type checking, ty will find installed packages in the active virtual environment (via VIRTUAL_ENV) or discover a virtual environment named .venv in the project root or working directory. It will not find packages in non-virtual environments without specifying the target path with --python. See the module discovery documentation for details.

Learning more

To learn more about using ty, see the documentation.

Getting involved

If you have questions or want to report a bug, please open an issue in this repository.

Development of this project takes place in the Ruff repository at this time. Please open pull requests there for changes to anything in the ruff submodule (which includes all of the Rust source code).

See the contributing guide for more details.

License

ty is licensed under the MIT license (LICENSE or ).

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in ty by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.

Versions
0.0.1-alpha.8
0.0.1-alpha.7
0.0.1-alpha.6
0.0.1-alpha.2
Website
License