Skip to main content

PYB11Generator is a code generation tool which generates pybind11 code for binding C++ to Python. Documentation is available at https://pyb11generator.readthedocs.io/

Project description

PYB11Generator

PYB11Generator is a python based code generator that creates pybind11 code for binding C++ libraries as extensions in Python. PYB11Generator parses input that is very close to writing the desired interface in native python, turning this into the corresponding pybind11 C++ code.

Note, since PYB11Generator blindly generates C++ pybind11 code, it is essential to understand the pybind11 package itself as well! In other words, be sure to read and understand the pybind11 documentation before trying to go too far with PYB11Generator. The purpose of PYB11Generator is to reduce the burden of writing and maintaining redundant code when working with pybind11 (such as the trampoline classes), and provide a natural syntax for those already familiar with writing interfaces in Python. However, since the generated pybind11 code produced by PYB11Generator is what is actually compiled by a C++ compiler to create the corresponding python package, any errors reported by the compiler will refer to this generated code, and require understanding pybind11 itself to properly interpret.

Documentation

PYB11Generator is documented at readthedocs.

Note the source for this documentation is embedded in the PYB11Generator repository under docs/.

Contributions

Although a great deal of the functionality of pybind11 is available via PYB11Generator, there are certainly missing pieces and improvements that can be made. Contributions are welcome, and should be provided as pull requests to the main repository. Note all contributions must be provided under the same license for distribution (in this case the BSD license).

License

PYB11Generator is released under the BSD license.

LLNL-CODE-767799

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyb11generator-2025.12.1.tar.gz (966.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyb11generator-2025.12.1-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file pyb11generator-2025.12.1.tar.gz.

File metadata

  • Download URL: pyb11generator-2025.12.1.tar.gz
  • Upload date:
  • Size: 966.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for pyb11generator-2025.12.1.tar.gz
Algorithm Hash digest
SHA256 2079661203ff526a8d45abee88c16d804ed19f30a38256b13b1a8a3ecf1cb3f2
MD5 8132cd12a37de9eba08ac34da079637e
BLAKE2b-256 97baf0f74d2094bd5a2d87c048b8c89f002cdf10d34c2555eaf427ea91db264f

See more details on using hashes here.

File details

Details for the file pyb11generator-2025.12.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyb11generator-2025.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb359d5d0fcc53b215ffcadd2a62673dd150e169b6cd17c8a7327ff3edcadf13
MD5 6eb6ac9b481f4e9dbe6835aa43629c12
BLAKE2b-256 39145c44d6a5383c220b1b515e8f7239426f66e63155e70959e967d0b107f038

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page