Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Pybind11 | 12,910 | 381 | 353 | 2 days ago | 41 | March 31, 2022 | 561 | other | C++ | |
Seamless operability between C++11 and Python | ||||||||||
Python Zstandard | 381 | 31 | 129 | 25 days ago | 36 | June 21, 2022 | 33 | bsd-3-clause | C | |
Python bindings to the Zstandard (zstd) compression library | ||||||||||
Node Spdlog | 44 | 122 | 5 | 7 days ago | 33 | August 11, 2021 | 3 | mit | C++ | |
Spdlog bindings for Node.JS | ||||||||||
Avif | 12 | a month ago | mit | Python | ||||||
Python (CFFI) bindings for libavif | ||||||||||
Rust Secp256k1 Zkp | 10 | 2 years ago | 2 | cc0-1.0 | C | |||||
Python Juce | 9 | 3 years ago | mit | Python | ||||||
Python bindings for manipulating Projucer .jucer files | ||||||||||
Jtravis | 7 | a year ago | 12 | June 02, 2021 | 4 | lgpl-3.0 | Java | |||
A java binding for the TravisCI Travis REST API | ||||||||||
Libclang Python3 | 6 | 4 years ago | Python | |||||||
libclang bindings for Python 3 | ||||||||||
Minimal R Package Discuss | 5 | 5 years ago | 2 | |||||||
Discussion place for R packages built with "extras", special libraries and bindings. | ||||||||||
Tetris Csfml | 4 | 3 years ago | wtfpl | C | ||||||
Tetris written in pure C with CSFML library. Confusing implementation, don't take it seriously. |
pybind11 Seamless operability between C++11 and Python
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 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.Pythonand the reason for creating such a similar projectis Boost. Boost is an enormously large and complex suite of utility libraries that works with almost every C++ compiler in existence. This compatibility has its cost: arcane template tricks and workarounds are necessary to support the oldest and buggiest of compiler specimens. Now that C++11-compatible compilers are widely available, this heavy machinery has become an excessively large and unnecessary dependency.
Think of this library as a tiny self-contained version of Boost.Python with everything stripped away that isn't relevant for binding generation. Without comments, the core header files only require ~4K lines of code and depend on Python (3.6+, or PyPy) and the C++ standard library. This compact implementation was possible thanks to some of the new C++11 language features (specifically: tuples, lambda functions and variadic templates). Since its creation, this library has grown beyond Boost.Python in many ways, leading to dramatically simpler binding code in many common situations.
Tutorial and reference documentation is provided at pybind11.readthedocs.io. A PDF version of the manual is available here. And the source code is always available at github.com/pybind/pybind11.
pybind11 can map the following core C++ features to Python:
std::shared_ptr
In addition to the core functionality, pybind11 provides some extra goodies:
constexpr
), leading to smaller binaries.This project was created by Wenzel Jakob. Significant features and/or improvements to the code were contributed by Jonas Adler, Lori A. Burns, Sylvain Corlay, Eric Cousineau, Aaron Gokaslan, Ralf Grosse-Kunstleve, Trent Houliston, Axel Huebl, @hulucc, Yannick Jadoul, Sergey Lyskov Johan Mabille, Tomasz Misko, Dean Moldovan, Ben Pritchard, Jason Rhinelander, Boris Schling, Pim Schellart, Henry Schreiner, Ivan Smirnov, Boris Staletic, and Patrick Stewart.
We thank Google for a generous financial contribution to the continuous integration infrastructure used by this project.
See the contributing guide for information on building and contributing to pybind11.
pybind11 is provided under a BSD-style license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.