Skip to content
/ litgen Public

litgen: a pybind11 automatic generator for humans who like nice code and API documentation. Also a C++ transformer tool

License

Notifications You must be signed in to change notification settings

pthom/litgen

Repository files navigation

Pip

litgen - Literate Generator

litgen is an automatic Python bindings generator designed for developers who appreciate clean, well-documented, and discoverable code and APIs.

It simplifies the process of creating Python bindings for C++ libraries using pybind11 or nanobind, and generating bindings that are easy to use, properly documented, and fully integrated into Python IDEs.

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 making a donation. Your support helps keep the project alive and growing. 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.

About

litgen: a pybind11 automatic generator for humans who like nice code and API documentation. Also a C++ transformer tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published