# pybind/pybind11

Seamless operability between C++11 and Python

Repository: https://github.com/pybind/pybind11
Canonical: https://ross.abutalabs.com/products/pybind11
Homepage: https://pybind11.readthedocs.io/
Language: C++
License: NOASSERTION
License Family: other
Topics: python, bindings
Last push: 2026-08-25T03:39:54+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 84, longevity 100
- inputs: {"age_days": 4077, "days_push": 8, "days_rel": 27, "gap_med": 42.5, "n_releases_24m": 9}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 18008, forks 2320 (observed 2026-08-28T04:11:20.831836+00:00)

## What it is
pybind11 is a lightweight header-only C++11 library that exposes C++ types and functions in Python (and vice versa), primarily for creating Python bindings of existing C++ code. It uses compile-time introspection to minimize boilerplate, serving as a compact, self-contained alternative to Boost.Python.

## Use cases
- create python bindings for a c++ library
- call c++ code from python
- expose c++ classes and functions as a python extension module
- embed the python interpreter in a c++ application
- wrap c++ stl containers and smart pointers for python
- speed up python hot paths with compiled c++ extensions

## When to choose
- you want modern C++11 bindings with minimal boilerplate
- you want a lightweight alternative to Boost.Python without the Boost dependency
- you need to bind classes, overloaded functions, exceptions, STL containers, or smart pointers
- you need CPython, PyPy, or GraalPy support with CMake/Setuptools/scikit-build integration

## When to avoid
- your codebase must support pre-C++11 compilers
- you need bindings for languages other than Python
- you prefer a runtime-based binding approach like ctypes or cffi without compilation

## Facets
- artifact type: library
- maturity: stable
- function: sdk, developer-tools, compiler
- domain: developer-tools, programming-languages, cross-platform
- platform: python, cpp, cross-platform, windows
- tags: python-bindings, c++11, header-only, extension-modules, boost-python-alternative, cpython, pypy, numpy, cmake, linux, macos

## Member repositories
- pybind/pybind11 (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:20.831836+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:02:11.384182+00:00, confidence not recorded.
  - readme: https://github.com/pybind/pybind11 (fetched 2026-08-28T04:11:20.831836+00:00, sha 4960b53740cf)
  - homepage: https://pybind11.readthedocs.io/ (fetched 2026-08-29T08:00:16.097176+00:00, sha 281669e94af3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
