pybind11
Seamless operability between C++11 and Python
Install
pybind11 on PyPI
pip
pip install pybind11uv
uv add pybind11poetry
poetry add pybind11Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pybind11-3.1.0-py3-none-any.whl
Keywords: C++11, Python bindings
About pybind11
from the package's own PyPI description — quoted content, verbatim
.. figure:: https://github.com/pybind/pybind11/raw/master/docs/pybind11-logo.png :alt: pybind11 logo
pybind11 (v3) — Seamless interoperability between C++ and Python
|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions|
|CI| |Build status| |SPEC 4 — Using and Creating Nightly Wheels|
|Repology| |PyPI package| |Conda-forge| |Python Versions|
Setuptools example <https://github.com/pybind/python_example>
• Scikit-build example <https://github.com/pybind/scikit_build_example>
• CMake example <https://github.com/pybind/cmake_example>_
.. start
pybind11 is a lightweight header-only library that exposes C++ types
in Python and vice versa, mainly to create Python bindings of existing
C++ code. Its goals and syntax are similar to the excellent
Boost.Python <http://www.boost.org/doc/libs/1_58_0/libs/python/doc/>_
library by David Abrahams: to minimize boilerplate code in traditional
extension modules by inferring type information using compile-time
introspection.
The main issue with Boost.Python—and the reason for creating such a similar project—is Boost. Boost is an enormously large and complex suite of utility...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
pybind11 is a lightweight header-only C++ library that creates Python bindings for C++ code, mapping C++ types, functions, classes, and STL containers to Python with minimal boilerplate.
Installation is straightforward with low friction—pybind11 ships as a wheel with no runtime dependencies, and the project maintains active development with a release 7 days old.
BSD-3-Clause is a permissive license that allows commercial and private use with minimal restrictions; you must include the license text and attribution.
Usage
pip install pybind11==3.1.0
import pybind11
print(pybind11.get_cmake_dir())
Requires Python 3.9+; binding code itself requires a C++ compiler and build toolchain (setuptools, scikit-build, or CMake).
Verdict: pybind11 is a mature, actively maintained library with no known vulnerabilities and broad Python version support (3.9–3.15). It is the standard choice for creating Python bindings from C++ code, offering a lightweight alternative with significantly smaller binaries and faster compile times than comparable solutions.
Needs verification
- GitHub star count and exact repository metrics beyond maintenance status.
- Whether the package includes pre-built bindings or requires end-user C++ compilation for typical use cases.
- Performance characteristics and memory overhead compared to direct C extensions or ctypes.
- Compatibility guarantees with PyPy 3.7.17+ and GraalPy 24.1+ beyond the stated support.
Similar packages
permissive · top 1,000 on PyPI
sixpermissive · top 100 on PyPI
tree-sitter-bashpermissive · top 1,000 on PyPI
kiwisolverpermissive · top 1,000 on PyPI
matplotlibpermissive · top 1,000 on PyPI
numbapermissive · top 1,000 on PyPI
semverpermissive · top 1,000 on PyPI
prompt_toolkitpermissive · top 1,000 on PyPI
oauthlibpermissive · top 1,000 on PyPI
pdfminer.sixpermissive · top 1,000 on PyPI