Skip to main content

litgen, aka "Literate Generator", an automatic python bindings generator for humans who like nice code and APIs, based on srcML (https://srcml.org)

Project description

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.

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

litgen-0.22.0.tar.gz (16.1 MB view details)

Uploaded Source

Built Distribution

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

litgen-0.22.0-py3-none-any.whl (706.4 kB view details)

Uploaded Python 3

File details

Details for the file litgen-0.22.0.tar.gz.

File metadata

  • Download URL: litgen-0.22.0.tar.gz
  • Upload date:
  • Size: 16.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for litgen-0.22.0.tar.gz
Algorithm Hash digest
SHA256 e614e566ec25a5b4f79f37e221e5cf9fd4537c79dd6549b1f9bb73f9d322bffb
MD5 99909084fb95e740de36719cdcc5f505
BLAKE2b-256 076459c2067378ee07e85de5d2d9052f2cc552b11c8e201f0a7a3869523657e1

See more details on using hashes here.

File details

Details for the file litgen-0.22.0-py3-none-any.whl.

File metadata

  • Download URL: litgen-0.22.0-py3-none-any.whl
  • Upload date:
  • Size: 706.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for litgen-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f24d813b2078c2e165d7388cbc4a7a6aba2c1ff14b2e30809bca13a0d2fdbf66
MD5 5a3db7d851133ecdb6221e2e988a9ac3
BLAKE2b-256 876cae3903b8e69ed862698ab23550a99de5f19f7554b5623d4906d1109d65a3

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