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
- Build the package:
uv build
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytemplify-0.1.6.tar.gz.
File metadata
- Download URL: pytemplify-0.1.6.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e8e62a1e60fa252a50430dc19e0613a8b33d21cb6178146009c142f628a408f
|
|
| MD5 |
4b819ec79c5b781f091061f9b9118610
|
|
| BLAKE2b-256 |
cdd15c8cc642bb6b4fc57997e925847797bed0e7023064173373be5e3e53c781
|
File details
Details for the file pytemplify-0.1.6-py3-none-any.whl.
File metadata
- Download URL: pytemplify-0.1.6-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6be7098845d7e0b1dad8c4636fc05e9fd754052208347da02ac6fdec5e28d9b0
|
|
| MD5 |
21a21262a8528bfb93689fc4198d5059
|
|
| BLAKE2b-256 |
d291bb06f8c3cb7a6d39c6987e0f52c546acad71fe81edaca6a26dc332734933
|