Catch type errors in a large Python codebase before running tests or deploying
Get instant autocomplete and hover documentation in VS Code or Neovim powered by a fast language server
Migrate a Python project from Mypy to a faster type checker without fixing every existing error at once using the suppression helper
Automatically add type annotations to untyped Python code using the built-in inference command
| facebook/pyrefly | dudykr/stc | flosse/rust-web-framework-comparison | |
|---|---|---|---|
| Stars | 5,730 | 5,725 | 5,724 |
| Language | Rust | Rust | Rust |
| Setup difficulty | easy | hard | easy |
| Complexity | 2/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Pyrefly is a tool from Meta that checks Python code for type errors before the code runs. In Python, variables and functions can optionally carry type annotations that describe what kind of data they hold or return. A type checker reads those annotations and warns you when the code does something that conflicts with them, catching whole categories of bugs without executing a single line. The main selling point is speed. Pyrefly checks over 1.85 million lines of Python code per second, which the README says is 15 times faster than the two most established alternatives, Mypy and Pyright. At Meta, it is the default type checker for Instagram's Python codebase, which runs to about 20 million lines. Large open source projects including PyTorch and JAX have also adopted it. Beyond checking for errors at the command line, Pyrefly works as a language server, which means it can power editor features like autocomplete, jump-to-definition, hover documentation, and code highlighting. Extensions are available for VS Code, Neovim, and Zed. The check that runs after you save a file typically completes in under 10 milliseconds, so the feedback appears almost immediately while you work. For teams migrating from an existing type checker, Pyrefly provides a few helper commands. One initializes a configuration file and sets up a project. Another adds suppression comments to any errors that already exist in the codebase, so you can start enforcing types on new code without having to fix every old error at once. A third command can infer and insert type annotations automatically for code that does not have them yet. The tool also has built-in understanding of popular Python frameworks like Pydantic and Django, including their specific patterns for defining data models and fields.
Pyrefly is Meta's open-source Python type checker that finds bugs in your code before it runs, checking over 1.85 million lines per second, 15 times faster than Mypy or Pyright, with editor support and automatic type inference.
Mainly Rust. The stack also includes Rust, Python.
Open-source from Meta, free to use, modify, and distribute.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.