pybind11
brew install pybind11
v3.0.4
BSD-3-Clause
Header-only C++ library for creating Python bindings from C++11 code with minimal boilerplate.
Why you might care
pybind11 lets you expose C++ classes and functions to Python with clean, declarative syntax and automatic type conversion—essential for performance-critical modules or wrapping existing C++ libraries. It's significantly lighter than Boost.Python (header-only, no separate compilation), and widely used in scientific Python (NumPy, SciPy ecosystem) and machine-learning projects.
3.2k
30-day installs · #774
13.6k
90-day · #687
70.5k
365-day · #537
17.9k
★ GitHub stars · updated 3d ago
Build dependencies
GitHub topics
bindings
python
Links
- https://github.com/pybind/pybind11
- GitHub: pybind/pybind11
- Brew formula source: Formula/p/pybind11.rb
Blurb generated by claude-haiku-4-5 on today.
Raw metadata
{
"aliases": [],
"alternatives": [
"Boost.Python",
"SWIG",
"ctypes",
"cffi"
],
"build_dependencies": [
"cmake",
"python@3.13",
"python@3.14"
],
"categories": [
"binding",
"header-only-library",
"library"
],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Seamless operability between C++11 and Python",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:41:05+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "pybind11",
"github_default_branch": "master",
"github_last_commit_at": "2026-06-17T12:16:49Z",
"github_readme_excerpt": ".. figure:: https://github.com/pybind/pybind11/raw/master/docs/pybind11-logo.png\n :alt: pybind11 logo\n\n**pybind11 (v3) \u2014 Seamless interoperability between C++ and Python**\n\n|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions|\n\n|CI| |Build status| |SPEC 4 \u2014 Using and Creating Nightly Wheels|\n\n|Repology| |PyPI package| |Conda-forge| |Python Versions|\n\n`Setuptools example \u003chttps://github.com/pybind/python_example\u003e`_\n\u2022 `Scikit-build example \u003chttps://github.com/pybind/scikit_build_example\u003e`_\n\u2022 `CMake example \u003chttps://github.com/pybind/cmake_example\u003e`_\n\n.. start\n\n\n**pybind11** is a lightweight header-only library that exposes C++ types\nin Python and vice versa, mainly to create Python bindings of existing\nC++ code. Its goals and syntax are similar to the excellent\n`Boost.Python \u003chttp://www.boost.org/doc/libs/1_58_0/libs/python/doc/\u003e`_\nlibrary by David Abrahams: to minimize boilerplate code in traditional\nextension modules by inferring type information using compile-time\nintrospection.\n\nThe main issue with Boost.Python\u2014and the reason for creating such a\nsimilar project\u2014is Boost. Boost is an enormously large and complex suite\nof utility libraries that works with almost every C++ compiler in\nexistence. This compatibility has its cost: arcane template tricks and\nworkarounds are necessary to support the oldest and buggiest of compiler\nspecimens. Now that C++11-compatible compilers are widely available,\nthis heavy machinery has become an excessively large and unnecessary\ndependency.\n\nThink of this library as a tiny self-contained version of Boost.Python\nwith everything stripped away that isn\u0027t relevant for binding\ngeneration. Without comments, the core header files only require ~4K\nlines of code and depend on Python (CPython 3.8+, PyPy, or GraalPy) and the C++\nstandard library. This compact implementation was possible thanks to some C++11\nlanguage features (specifically: tuples, lambda functions and variadic\ntemplates). Since its cre",
"github_repo": "pybind/pybind11",
"github_stars": 17920,
"github_topics": [
"bindings",
"python"
],
"homepage": "https://github.com/pybind/pybind11",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 3199,
"installs_365d": 70466,
"installs_90d": 13588,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "BSD-3-Clause",
"llm_generated_at": "2026-06-20T23:46:59+00:00",
"llm_model": "claude-haiku-4-5",
"name": "pybind11",
"oldnames": [],
"one_liner": "Header-only C++ library for creating Python bindings from C++11 code with minimal boilerplate.",
"optional_dependencies": [],
"rank_30d": 774,
"rank_365d": 537,
"rank_90d": 687,
"raw_hash": "ce8ab2f363d8df21",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/p/pybind11.rb",
"tap": "homebrew/core",
"test_dependencies": [
"python@3.13",
"python@3.14"
],
"uses_from_macos": [],
"version_head": null,
"version_stable": "3.0.4",
"versioned_formulae": [],
"why_use_this": "pybind11 lets you expose C++ classes and functions to Python with clean, declarative syntax and automatic type conversion\u2014essential for performance-critical modules or wrapping existing C++ libraries. It\u0027s significantly lighter than Boost.Python (header-only, no separate compilation), and widely used in scientific Python (NumPy, SciPy ecosystem) and machine-learning projects."
}