whatisgithub

What is pyre-check?

facebook/pyre-check — explained in plain English

Analysis updated 2026-06-24

7,156OCamlAudience · developerComplexity · 3/5Setup · moderate

In one sentence

Pyre is Facebook's fast Python type checker that catches type-mismatch bugs before code runs, it also ships Pysa, a companion tool that traces data flow to detect security vulnerabilities like SQL injection.

Mindmap

mindmap
  root((pyre-check))
    What it does
      Python type checking
      Security analysis
    Tools
      Pyre type checker
      Pysa taint analysis
    How it works
      Incremental updates
      Background process
    Audience
      Python developers
      Security engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add Pyre to a large Python codebase so type errors are flagged instantly after each file save.

USE CASE 2

Run Pysa on a web application to automatically find places where untrusted user input could reach a database query or shell command.

USE CASE 3

Integrate Pyre into a CI pipeline to block pull requests that introduce type errors.

What is it built with?

PythonOCamlWatchman

How does it compare?

facebook/pyre-checkastrada/google-drive-ocamlfusereasonml/reason
Stars7,1565,92310,307
LanguageOCamlOCamlOCaml
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Python 3.9+ and the Watchman file-watching tool, maintainers now recommend the successor project Pyrefly for new projects.

So what is it?

Pyre is a type checker for Python, built by Facebook. Python lets you write code without declaring what kind of data each variable holds, but you can add optional type hints to your code to describe that. Pyre reads those hints and flags any places where the actual data does not match what the hints say, catching a category of bugs before the code ever runs. It is built to be fast on large codebases. Rather than re-checking everything from scratch each time, it runs a background process that watches for file changes and updates its analysis incrementally, so checking a file after a small edit happens almost instantly even in a project with millions of lines of code. Pyre also ships with a companion tool called Pysa, which focuses on security. Pysa traces how data flows through a Python application and flags cases where untrusted input might reach a sensitive operation, such as a database query or a shell command, a class of bugs known as injection vulnerabilities. The README includes a note that a next-generation successor called Pyrefly is now available at a separate repository, and that Pyre itself is no longer the primary active development focus. For new projects, the maintainers point to Pyrefly instead. Pyre requires Python 3.9 or later and a file-watching tool called Watchman to run.

Copy-paste prompts

Prompt 1
I want to set up Pyre type checking on my Python project. Walk me through installing Pyre and creating the .pyre_configuration file.
Prompt 2
Pysa flagged a taint flow in my Django app between a request parameter and a database query. Explain what that means and how to fix it.
Prompt 3
I'm migrating a large Python codebase to add type hints. Show me how to run Pyre in a mode that only reports errors on files I've already annotated.
Prompt 4
Pyre says 'Incompatible parameter type' on a function call. Explain what the error means and how to add the right type annotation to fix it.

Frequently asked questions

What is pyre-check?

Pyre is Facebook's fast Python type checker that catches type-mismatch bugs before code runs, it also ships Pysa, a companion tool that traces data flow to detect security vulnerabilities like SQL injection.

What language is pyre-check written in?

Mainly OCaml. The stack also includes Python, OCaml, Watchman.

How hard is pyre-check to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pyre-check for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.