Skip to main content

Simple code generation tool with support for multiple types of inputs

Project description

Pycodegen is a tool to help you generate code in your project using powerful Jinja2 templates.

To get started:

python3 setup.py install

# Run cli
pycodegen

# Run cli using module
python3 -m pycodegen.cli
Frontend Description
cpp Parses C/C++ using libclang
json Passes a JSON file directly to the driver

How it works

  1. The requested frontend reads the input file and generates an intermediate representation.
  2. The representation is passed to the driver
  3. Driver does any processing required of the representation.
  4. Driver selects the output filename and template to be used and render the output file.

Example usage

# Generate the simple JSON example
pycodegen json examples/simple/input_file.json --driver examples/simple/driver.py --debug

# Get intermediate representation of a C++ file (to aid in driver development)
pycodegen cpp <name-of-file.cpp> --dump-json

Project details


Download files

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

Files for pycodegen, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size pycodegen-0.0.1-py3-none-any.whl (10.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pycodegen-0.0.1.tar.gz (6.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page