Skip to main content

A generic generator framework using Jinja2 and user-defined parsers.

Project description

pytemplify

Text file generator framework using parsed dictionary data and Jinja2 templates.

How to create your generator using pytemplify

Install uv:

curl -Ls https://astral.sh/uv/install.sh | sh

Install pytemplify:

pip install pytemplify

Generate the first skeleton of your generator using mygen-init:

cd <your-repo-path>
mygen-init

Complete the TODOs in modules; main implementation module is parser_<your-generator-name>.py.

Try to run:

uv pip install -r requirements.txt
uv venv
source .venv/bin/activate
<your-generator-name>
uv pip install nox
nox

Running Tests and Linters with nox

To run all sessions (formatting, linting, and tests):

nox

To run only tests:

nox -s tests

To run only linting:

nox -s lint

To run only code formatting:

nox -s format_code

Publishing to PyPI with uv

  1. Build the package:
uv build
  1. Publish to PyPI:
uv publish

For test PyPI, use:

uv publish --repository testpypi

TIPs

Activate uv virtual environment:

source .venv/bin/activate

Deactivate uv virtual environment:

deactivate

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

pytemplify-0.1.7.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

pytemplify-0.1.7-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file pytemplify-0.1.7.tar.gz.

File metadata

  • Download URL: pytemplify-0.1.7.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for pytemplify-0.1.7.tar.gz
Algorithm Hash digest
SHA256 d8d0591830b16d86902c6fa4f96b7d84da545fb8df37b339a49affeb360d8651
MD5 b1db4f0d55e74180a6b14ede2bc8f7f6
BLAKE2b-256 c4557ab53ac9cb093abc2e2794addd8e1fc42b79b97c3dc940a7952ba62e4b4e

See more details on using hashes here.

File details

Details for the file pytemplify-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for pytemplify-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 872be372e9dcc01e0ac173269511fd12a46160c39dccde17c736818bf3de106f
MD5 6214256f770d96ee869ca4b161b8cdb1
BLAKE2b-256 fdd9fee5e57940c2d43a4c120098f7b7de778b51c3113d46289a7db03f97b444

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