--- id: nanobind version: "2.14.0" license: unclear license_treatment: permissive maintenance: active --- # nanobind — nanobind: tiny and efficient C++/Python bindings License: permissive · Maintenance: active · Downloads: 4.2M/mo ## What it is and what it does nanobind is a C++/Python binding library designed to expose C++ types and functions in Python with minimal overhead. It follows syntax similar to Boost.Python and pybind11, making it familiar to developers who have used those tools. The core value proposition is efficiency: the description reports faster compilation times, smaller compiled binaries, and lower runtime performance penalties compared to pybind11 and Cython. You use nanobind when you need to call C++ code from Python or wrap C++ libraries for Python consumption. It is a build-time tool—you write binding code that nanobind processes to generate Python-callable wrappers around your C++ components. The package itself installs without friction as a pre-built wheel, though actually using it requires a C++ compiler and build environment to compile your bindings. Use it for: - Wrap existing C++ libraries to make them callable from Python without rewriting them - Build high-performance Python extensions in C++ where pure Python is too slow - Create Python bindings for scientific or numerical C++ code with minimal runtime overhead - Integrate C++ game engines, graphics libraries, or real-time systems with Python applications ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. nanobind exposes C++ types in Python and vice versa, enabling efficient C++/Python bindings with faster compilation, smaller binaries, and lower runtime overhead than comparable tools. Yes, if you need to bind C++ code to Python. The package is actively maintained, has no known vulnerabilities, installs with low friction, and offers a permissive license. The efficiency claims relative to pybind11 are significant enough to justify trying it for performance-critical bindings, though you should verify those claims match your specific use case. ## Install pip install nanobind uv add nanobind poetry add nanobind ## Installing nanobind Before you install: Low friction: ships as a pre-built wheel. Actively maintained with a release 7 days ago and 3668 repository stars. License in practice: Permissive license allows commercial and private use with minimal restrictions. Quickstart: pip install nanobind==2.14.0 import nanobind as nb # Use nanobind to wrap C++ code in Python bindings Requires a C++ compiler and build toolchain to compile C++ code being wrapped; the wheel itself installs without compilation. Verify before relying: - Exact performance multipliers (4×, 5×, 10×) claimed in description against pybind11 and Cython—whether these hold across typical use cases - Whether nanobind supports all C++ standards and features that pybind11 or Cython cover, or if there are known gaps ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 4.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags C++ Python bindings, expose C++ to Python, efficient C++ wrapper, Python C++ interop, lightweight binding library, C++ type wrapping, fast Python C++ bridge, c++-python-interop, binding-generator, performance-focused [View on SkillFed](https://skillfed.io/packages/nanobind) · [View on PyPI](https://pypi.org/project/nanobind/)