Skip to Content

Introducing Pyrefly: Turbocharging Python Type Checking with Real-Time Speed

Catch Bugs Instantly with Next-Gen Type Checking

Get All The Latest Research & News!

Thanks for registering!

Identifying Python bugs as you type, no more waiting for slow checks or missed errors is the promise of Pyrefly, Meta’s new alpha-stage type checker and IDE extension designed to deliver lightning-fast, accurate feedback, even on massive codebases. Built in Rust for top performance, Pyrefly supports both command-line workflows and smooth integration with modern editors like VSCode.

Pyrefly’s Standout Features

  • Ultra-fast static type analysis: Pyrefly checks your Python code for type consistency before you run it, helping you catch mistakes early and often.
  • Flexible integration: Whether you prefer the CLI or VSCode, Pyrefly adapts to projects big and small, making it a seamless fit for any workflow.
  • Straightforward migration: Moving from other type checkers? Pyrefly offers easy configuration migration to get you up and running quickly.
  • Thriving open source community: Released under the MIT license, Pyrefly invites collaboration, feedback, and contributions via GitHub and Discord.

Getting started is simple: install Pyrefly with pip and add the VSCode extension. The team encourages feedback as they work toward a stable, production-ready release.

Why Pyrefly? The Motivation Behind the Tool

Meta’s original Pyre type checker met the needs of large-scale codebases like Instagram’s. However, changing demands—especially for real-time feedback during development—highlighted the need for a new solution. Pyrefly’s architecture focuses on performance, extensibility, and robust IDE integration, supporting advanced developer tools such as code navigation and type exports at an unprecedented scale.

Core Principles Guiding Pyrefly’s Development

  • Speed: Capable of analyzing up to 1.8 million lines of code per second, Pyrefly delivers immediate feedback right as you code, not just during CI runs.
  • IDE-first experience: Developers experience consistent, responsive feedback in both the IDE and command-line environments, with real-time code analysis.
  • Automatic type inference: Pyrefly is designed for Python projects with incomplete type annotations, automatically inferring types and letting users insert them directly from their editor.
  • Open source collaboration: True to Python’s open ethos, Pyrefly is built in the open on GitHub and shaped by community input, bug reports, and contributions.

Shaping Python’s Future with Pyrefly

Pyrefly represents more than just a high-speed type checker—it’s a step toward a more robust, productive Python ecosystem. Meta’s team, with a track record of contributing to Python’s core (including PEPs and libraries), aims to empower everyone from seasoned maintainers to newcomers with accessible, efficient type checking. The ongoing alpha phase is just the start; future releases will be driven by community feedback and evolving needs.

With Pyrefly, developers can look forward to fewer bugs and smoother workflows, making type safety a practical reality in everyday Python coding.

How to Get Involved

  • Test Pyrefly and share feedback or issues on GitHub.
  • Join discussions and connect with other developers on Discord.
  • Explore technical deep-dives via the Meta Tech Podcast and at major events like PyCon US.

Pyrefly’s alpha release is your invitation to help shape the next era of Python development. Try it, contribute, and be part of the journey as Meta and the open source community build a smarter, faster Python together.

Source

engineering.fb.com: Introducing Pyrefly


Introducing Pyrefly: Turbocharging Python Type Checking with Real-Time Speed
Joshua Berkowitz May 20, 2025
Share this post
Sign in to leave a comment
GitHub Copilot's New Coding Agent Is Transforming Developer Workflows
The Future of Delegating Routine Coding Tasks to AI is Here