OpenSource-Hub
P

pyrefly

SHA-256
6.1k stars·Developer Tools·SHA-256 checksum verified

A fast type checker and language server for Python, proven on Instagram's 20-million-line codebase. 15x faster than Mypy and Pyright, with seamless IDE integration and zero-config framework support.

Smart Download

Download Download Version

v1.0.0 · 12.9 MB

15x faster than Mypy/Pyright, production-proven on Instagram's 20M-line codebase, with full IDE features.

Core Features

  • Blazingly fast: checks 1.85M lines/sec, 15x faster than Mypy/Pyright
  • Full-featured language server: navigation, autocomplete, hover, inlay hints, semantic highlighting
  • Built-in support for Pydantic & Django: model validation, field types, autocomplete out of the box
  • Easy migration from Mypy/Pyright: init, suppress, infer commands
  • Production-proven at Meta: default type checker for Instagram's 20M-line Python codebase

What It Can't Do

  • Pyrefly does NOT follow strict semantic versioning; minor version upgrades may introduce new type errors. Use `pyrefly suppress` to silence them after upgrading. Some dynamic Python patterns (e.g., runtime attribute injection) may not be fully supported.

Use Cases

  • Type-checking large Python codebases with speed, especially when migrating from Mypy or Pyright
  • Projects using Pydantic or Django that want zero-config type support in the IDE

Detailed Introduction

Pyrefly is a lightning-fast type checker and language server for Python, designed for large-scale production use. It checks over 1.85 million lines per second—15x faster than Mypy and Pyright—and delivers sub-10ms rechecks in the IDE. Built and battle-tested at Meta on Instagram's 20-million-line codebase, it's also adopted by open-source projects like PyTorch and JAX. Key features include a full-featured language server (code navigation, autocomplete, semantic highlighting, inlay hints), built-in support for Pydantic and Django (model validation, field types, autocomplete out of the box), and a smooth migration path from Mypy or Pyright via `pyrefly init`, `pyrefly suppress`, and `pyrefly infer`. Available as a CLI tool (`pip install pyrefly`) or VS Code/Neovim/Zed extension.

Troubleshooting & FAQ (1)

Troubleshooting
Why does `pyrefly check --suppress-errors` place the inline ignore comment inside a multiline f-string instead of above it?

This is a known bug in pyrefly versions before 1.1.0. The fix is in commit 170ea02a1a3a1a437437dd5753f2df0d7b82620e. Update to pyrefly 1.1.0 or later to get the correct behavior that places the suppression comment on the line before the statement.

GitHub Issue #3682

Tags

type-checkerpythonlanguage-serveridemetafastpydanticdjango

Getting Started

1

Download installer

Click the button above to download the installer for your system

2

Install the software

Install the appropriate package for your distro (dpkg / rpm / AppImage)

3

Install the CLI: pip install pyrefly

4

Run pyrefly init in your project to generate config (or just pyrefly with defaults)

5

Install editor extension: VS Code Marketplace search 'pyrefly', or configure Neovim/Zed per docs

Install Guide
  1. Install the CLI: pip install pyrefly
  2. Run pyrefly init in your project to generate config (or just pyrefly with defaults)
  3. Install editor extension: VS Code Marketplace search 'pyrefly', or configure Neovim/Zed per docs
File Integrity

SHA-256 checksum verified

Checksum extracted from GitHub official Release page

SHA256 Checksum

8b35318ba7377a621ff9d9ef77a443b6ad3cf065be566c84f5ae9c8318df5459

This checksum is extracted from the GitHub Release page. Verify file integrity after download.

All SHA-256 checksums on this platform are extracted from the project's official GitHub Release page, without any modification. You can independently verify them on the GitHub Releases page.

Open Source Transparency

View GitHub Source
Environment Guide

Uninstall Info

Uninstall CLI: pip uninstall pyrefly. In VS Code, remove the Pyrefly extension from the Extensions panel.

No Extra Dependencies

Ready to use after download. No additional runtime required.

Project Info
LicenseMIT
Last Updated2026-06-26 18:10:13
GitHub RepositoryOfficial Website

Having issues? Check the FAQ below

1 FAQ

Similar Projects