# PyO3/pyo3

Rust bindings for the Python interpreter

Repository: https://github.com/PyO3/pyo3
Canonical: https://ross.abutalabs.com/products/pyo3
Homepage: https://pyo3.rs
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, python, binding, ffi, python-c-api
Last push: 2026-08-24T22:44:20+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 96, longevity 100
- inputs: {"age_days": 3399, "days_push": 9, "days_rel": 28, "gap_med": 22, "n_releases_24m": 26}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 16074, forks 1010 (observed 2026-08-28T04:11:14.780192+00:00)

## What it is
PyO3 provides Rust bindings for the Python interpreter, letting developers write native Python extension modules in Rust or embed and run Python code inside Rust binaries. It supports CPython, PyPy, and GraalPy and is typically paired with the maturin build tool.

## Use cases
- write a Python extension module in Rust
- speed up slow Python hot paths with Rust
- embed a Python interpreter in a Rust application
- call Python code from Rust
- build and publish Rust-based Python packages with maturin
- expose Rust library functions to Python via FFI

## When to choose
- you need native-speed Rust code callable from Python
- you want to embed Python scripting in a Rust program
- you are building a Python package with a Rust core
- you need FFI bindings to the Python C API without writing C

## When to avoid
- your project is pure Python with no performance-critical code
- you need bindings for a language other than Rust or Python
- you cannot tolerate a build toolchain requiring Rust 1.83+

## Facets
- artifact type: library
- maturity: stable
- function: sdk, developer-tools
- domain: developer-tools, programming-languages, cross-platform
- platform: rust, python, cross-platform
- tags: ffi, python-c-api, cpython, pypy, graalpy, extension-modules, embedding, maturin

## Member repositories
- PyO3/pyo3 (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:14.780192+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:05:14.759263+00:00, confidence not recorded.
  - readme: https://github.com/PyO3/pyo3 (fetched 2026-08-28T04:11:14.780192+00:00, sha ccb920bc5146)
  - homepage: https://pyo3.rs (fetched 2026-08-29T08:02:58.471112+00:00, sha a3344f635c87)
  - site_page: https://pyo3.rs/v0.29.2/getting-started (fetched 2026-08-29T08:02:58.494609+00:00, sha 8a15ee80daf1)
  - registry_crates: https://crates.io/api/v1/crates/pyo3 (fetched 2026-08-29T08:02:58.497051+00:00, sha 2c14b96ea1a2)
  - site_page: https://pyo3.rs/latest/faq.html (fetched 2026-08-29T08:02:58.474318+00:00, sha bf4cd9122f63)
- Data as of 2026-08-30T08:39:29.467469+00:00.
