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.

Source Distribution

pycodegen-0.0.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

pycodegen-0.0.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pycodegen-0.0.1.tar.gz.

File metadata

  • Download URL: pycodegen-0.0.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for pycodegen-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1ccefcd5b93e1c6c6dd09a206d938097215ad3d621fb939a187ae2f042181d9b
MD5 f7c90d68b3b6e4f005d75c76e6393e05
BLAKE2b-256 ea2c439f48a817fd084f5ee83f6d258a53688c973de9743e425a833e8a09b2a1

See more details on using hashes here.

File details

Details for the file pycodegen-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pycodegen-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for pycodegen-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46e61d0852ce5d3f1bceee8d4dc93510a9bf3376adac627405afbb772a613c24
MD5 7fc59c1985deba9f54258ccb70cd54fc
BLAKE2b-256 45a21c7511bb73cf50a8fe5343eceb7448e9be399261f2f59102d89280ab2d86

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