pybind11-global
Seamless operability between C++11 and Python
Decision gist · record as of 2026-08-14
Yes. This is production-ready, actively maintained, and the standard choice for binding C++ to Python when wrapping existing C++ code or accelerating Python with compiled C++. Install it if building Python extensions in C++ or integrating C++ libraries into Python projects. Low install friction, permissive license, and zero runtime dependencies make it a safe, practical choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a C++11-compatible compiler and Python development headers; a compilation step is necessary (typically via setuptools, scikit-build, or CMake).
- Installation is straightforward—a pure wheel with no compiled dependencies.
- The project is actively maintained with a release 8 days old and strong community backing (17995 stars), making it reliable for production use.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is permissive and imposes no restrictions on commercial or proprietary use; you may use, modify, and distribute bindings freely provided you retain the license notice.
last release 2026-08-06 (8 days) · last repo commit 2026-08-14 · 17,995 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 579,435 downloads/mo, #5,918 on PyPI
Alternatives
Verify before relying
pip install pybind11-global
# In a C++ file:
#include <pybind11/pybind11.h>
PYBIND11_MODULE(mymodule, m) {
m.def("add", [](int a, int b) { return a + b; });
}- Specific performance characteristics compared to hand-written extension modules for simple bindings.
- Practical guidance on when this library is preferable to ctypes or CFFI for particular use cases.
- Coverage details for less common compiler and platform combinations beyond the CI test matrix.
What it is and what it does
This is a header-only C++ library that exposes C++ types, functions, and classes to Python with minimal boilerplate code. It works by using compile-time introspection to infer type information, allowing binding code that is dramatically simpler than traditional extension modules. The library supports custom data structures, instance and static methods, overloaded functions, exceptions, enumerations, callbacks, iterators, custom operators, single and multiple inheritance, STL containers, smart pointers, and virtual methods. It also integrates with NumPy for efficient array handling and can automatically vectorize functions across array arguments.
The core implementation is compact—only ~4K lines of code—and depends only on Python (CPython 3.9+, PyPy, or GraalPy) and the C++ standard library. This makes it far lighter than comparable alternatives while offering comparable or superior functionality. Binaries are typically smaller by a factor of at least 2, with faster compile times. The library is actively maintained, widely used in scientific and systems projects, and supports modern Python versions.
Use it for
- Wrap existing C++ libraries to use them from Python without rewriting in Python.
- Create high-performance Python extensions for computationally intensive code by writing the hot path in C++.
- Integrate C++ libraries with NumPy arrays for seamless data exchange.
- Expose C++ class hierarchies and virtual methods to Python, allowing subclassing and polymorphism.
- Build Python packages that leverage legacy C++ codebases or third-party C++ libraries.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is production-ready, actively maintained, and the standard choice for binding C++ to Python when wrapping existing C++ code or accelerating Python with compiled C++. Install it if building Python extensions in C++ or integrating C++ libraries into Python projects. Low install friction, permissive license, and zero runtime dependencies make it a safe, practical choice.
Install
pybind11-global on PyPI
Before you install
Installation is straightforward—a pure wheel with no compiled dependencies. The project is actively maintained with a release 8 days old and strong community backing (17995 stars), making it reliable for production use.
Requires a C++11-compatible compiler and Python development headers; a compilation step is necessary (typically via setuptools, scikit-build, or CMake).
License in practice
BSD-3-Clause is permissive and imposes no restrictions on commercial or proprietary use; you may use, modify, and distribute bindings freely provided you retain the license notice.
Quickstart
pip install pybind11-global
# In a C++ file:
#include <pybind11/pybind11.h>
PYBIND11_MODULE(mymodule, m) {
m.def("add", [](int a, int b) { return a + b; });
}
Verify before relying
- Specific performance characteristics compared to hand-written extension modules for simple bindings.
- Practical guidance on when this library is preferable to ctypes or CFFI for particular use cases.
- Coverage details for less common compiler and platform combinations beyond the CI test matrix.
Package 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 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 579,435 / month, #5,918 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: C++Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities |
Evidence: pybind11_global-3.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “create Python extensions C++”
- pybind11-globalA header-only C++ library that generates Python bindings for C++…
- jinja2-simple-tagsProvides base classes to create custom Jinja2 template tags…
- pycdlibPyCdlib is a pure Python library for parsing, creating, and writing…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also nanobind · pybind11 · PyBindGen · pytango · cppy · ccimport · llvmlite · cxxheaderparser · pybind11-stubgen · pydemumble