Skip to main content

Pip

litgen - Literate Generator

Automatic Python bindings for C++: readable, discoverable, IDE-friendly.

Battle-tested on 20+ libraries and 100,000 lines of code. Because your users deserve bindings they can actually read.

litgen generates Python bindings for C++ libraries using pybind11 or nanobind. It produces clean, documented, IDE-friendly code with accurate function signatures and auto-completion.

For a full guide on how to use litgen, see the documentation.

Key Features

  • Automatically generates Python bindings for C++ libraries.
  • Generates fully documented and discoverable Python code, ensuring smooth interaction for end users.
  • Provides IDE-friendly bindings with accurate function signatures and auto-completion.
  • Works as a C++ transformation and refactoring tool, useful for various workflows.

Documentation

To dive deeper into how litgen works, check out the full documentation.

Battle-Tested

Though relatively new (released in 2022), litgen has been extensively tested on over 20 different libraries, totaling more than 100,000 lines of code. It is the main engine behind the Python bindings for the popular Dear ImGui Bundle.

Keep in Touch

We’d love to hear about how you're using litgen! If you are using it, please consider sharing your experience and insights.

Help the Project

If litgen has made a difference for you, especially in a commercial or research setting, please consider sponsoring its maintenance. Every contribution, no matter the size, is greatly appreciated!

Contributions

Contributions are welcome! If you'd like to report a bug, suggest a feature, or submit a pull request, please visit our GitHub issues page. See the developer documentation inside Build.md

Notable contributors:

  • Many thanks to @davidlatwe for his contributions to the nanobind support in litgen!

License

litgen is published under the GNU General Public License, version 3. Code generated by litgen is not subject to GPL, allowing you to freely use it in your projects.

Metadata

Release files for litgen 0.23.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litgen 0.23.0
File Size Uploaded Provenance Actions
litgen-0.23.0.tar.gz 2.5 MB With provenance Details for litgen-0.23.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for litgen 0.23.0
File Interpreter ABI Platform Actions
litgen-0.23.0-py3-none-any.whl Python 3 none any Details for litgen-0.23.0-py3-none-any.whl

Total release size: 3.3 MB

Release files / litgen-0.23.0.tar.gz

Download URL litgen-0.23.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
6d00487ad40834f4b8677e9fb70f0132689b378e966708c01363341f46736616
BLAKE2b-256 checksum
How to use checksums
249dfcabf4631ec475cb71321c9201de1d6291b54a67f42436c0a3ea5abcdb6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / litgen-0.23.0-py3-none-any.whl

Download URL litgen-0.23.0-py3-none-any.whl
Size 800.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87434f0a43ae51ad072fa2d37d41982b79c8c074c833f0aaa3521ba87a7d531b
BLAKE2b-256 checksum
How to use checksums
96676221344f284558225d91b0dbe527e09e2348e5bd65db946693e87ae3f2f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for litgen 0.23.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for litgen-0.23.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page