# Pyre

> static type checker for Python

**Wikidata**: [Q102522165](https://www.wikidata.org/wiki/Q102522165)  
**Source**: https://4ort.xyz/entity/pyre

## Summary
Pyre is a static type checker designed for the Python programming language. Developed by Meta, it analyzes code to identify type errors and is built using OCaml. The tool is distributed as free software under the MIT License.

## Key Facts
- **Developer:** Meta (formerly Facebook)
- **Category:** Static type checker, Free software
- **Programming Language:** Written in OCaml
- **License:** MIT License
- **Website:** https://pyre-check.org/
- **Source Repository:** https://github.com/facebook/pyre-check
- **PyPI Package:** `pyre-check`
- **Successor:** Replaced by Pyrefly
- **Version History:** Includes versions such as 0.0.30 (released Aug 2019) through 0.9.11 (released April 2022)

## FAQs
### Q: What programming language is Pyre written in?
A: Pyre is written in OCaml, an extension of the Caml programming language. This distinguishes it from some other Python tooling that is often written in Python or C.

### Q: Is Pyre free to use?
A: Yes, Pyre is classified as free software released under the MIT License. This allows users to freely run, study, change, and distribute the software.

### Q: Who develops Pyre?
A: Pyre is developed by Meta, the American multinational technology corporation also known for developing social media platforms.

### Q: What are the technical dependencies for Pyre?
A: Pyre depends on several software libraries, including `async_generator`, `click`, `dataclasses-json`, `psutil`, `pyre-extensions`, `pywatchman`, `tabulate`, and `typing-extensions`.

## Why It Matters
Pyre serves a critical role in the software development lifecycle by enforcing static typing in Python, a language that is dynamically typed by default. By identifying type errors before code is executed, Pyre helps developers catch bugs early, improve code maintainability, and enhance overall system reliability. Its development by Meta suggests it is engineered to handle large, complex codebases typical of enterprise environments.

The tool's implementation in OCaml allows for high-performance analysis, making it suitable for checking large projects efficiently. As a free software solution, it contributes to the broader ecosystem of Python developer tools, offering an alternative to other type checkers like MyPy. Its inclusion of a user manual and active versioning history demonstrates a commitment to usability and ongoing maintenance.

## Notable For
- **Implementation Language:** Unlike many Python tools, Pyre is written in OCaml, optimizing for performance and speed in type inference.
- **Corporate Backing:** It is developed by Meta, ensuring support for massive scale codebases.
- **Feature Set:** Includes a "Watchman" dependency (`pywatchman`), suggesting capabilities for real-time or incremental checking during development.
- **Evolution:** It is noted as being replaced by "Pyrefly," indicating a trajectory of tool evolution within Meta's ecosystem.

## Body
### Development and Origin
Pyre was created and is maintained by Meta, a technology corporation headquartered in Menlo Park, California. While Meta is famously associated with social technology, the organization also produces significant open-source developer infrastructure. Pyre fits into this category as a utility intended to improve code quality.

### Technical Architecture
The core of Pyre is built using OCaml, a functional programming language known for its robust type system and performance. By leveraging OCaml, Pyre provides a performant backend for analyzing Python code. It operates as a static type checker, meaning it analyzes source code without executing it to verify that types are used consistently.

### Distribution and Availability
Pyre is distributed as free software under the MIT License. The source code is publicly hosted on GitHub at `facebook/pyre-check`. Users can install the tool via the Python Package Index (PyPI) under the project name `pyre-check`.

### Dependencies
To function, Pyre relies on a suite of Python libraries. Key dependencies include:
- `click`: For command-line interface creation.
- `psutil`: For system and process utilities.
- `pyre-extensions`: Likely for extended type definitions specific to Pyre.
- `typing-extensions`: For supporting newer typing features in older Python versions.

### Version History
Development of Pyre has been active, with frequent releases logged between 2019 and 2022.
- **Early Versions:** Releases such as `0.0.30` were published as early as August 2019.
- **Recent Versions:** By April 2022, the project had reached version `0.9.11`.

Documentation and getting-started guides are available in English at `https://pyre-check.org/docs/getting-started/`.

## References

1. [Source](https://github.com/facebook/pyre-check#license)
2. [The pyre-check Open Source Project on Open Hub: Languages Page. Open Hub](https://www.openhub.net/p/pyre-check/analyses/latest/languages_summary)
3. [Release 0.0.30. 2019](https://github.com/facebook/pyre-check/releases/tag/v0.0.30)
4. [Release 0.0.38. 2019](https://github.com/facebook/pyre-check/releases/tag/v0.0.38)
5. [Release 0.0.54. 2020](https://github.com/facebook/pyre-check/releases/tag/v0.0.54)
6. [Release 0.0.55. 2020](https://github.com/facebook/pyre-check/releases/tag/v0.0.55)
7. [Release 0.0.56. 2020](https://github.com/facebook/pyre-check/releases/tag/v0.0.56)
8. [Release 0.0.59. 2021](https://github.com/facebook/pyre-check/releases/tag/v0.0.59)
9. [Release 0.9.3. 2021](https://github.com/facebook/pyre-check/releases/tag/v0.9.3)
10. [Release 0.9.9. 2021](https://github.com/facebook/pyre-check/releases/tag/v0.9.9)
11. [Release 0.9.10. 2022](https://github.com/facebook/pyre-check/releases/tag/v0.9.10)
12. [Release 0.9.11. 2022](https://github.com/facebook/pyre-check/releases/tag/v0.9.11)
13. [Release 0.9.18. 2023](https://github.com/facebook/pyre-check/releases/tag/v0.9.18)
14. [Release 0.9.23. 2024](https://github.com/facebook/pyre-check/releases/tag/v0.9.23)
15. [Source](https://api.github.com/repos/facebook/pyre-check)