Jingen
Jingen generates files from Jinja2 based template files.
Usage:
Assuming a vars file mock_vars.py
VARS = {
"test_var": "vars_file_test_value"
}
and a template file: mock.template:
I'M A MOCK TEMPLATE AND MY VAR IS: {{ test_var }}
from jingen.jingen import Jingen
template_file = "mock.template"
vars_source = "tests/resources/mock_vars.py" # alternatively, can be a dict
output_file = "tests/resources/manual_test_result.file"
templates_dir = "tests/resources/"
make_file = True
verbose = True
i = Jingen(
template_file=template_file,
vars_source=vars_source,
output_file=output_file,
templates_dir=templates_dir,
make_file=make_file,
verbose=verbose)
output = i.generate()
print output
...
I'M A MOCK TEMPLATE AND MY VAR IS: vars_file_test_value
Output would be:
### DEBUG - generating template from tests/resources//mock.template
### DEBUG - creating file: tests/resources/manual_test_result.file with content:
I'M A MOCK TEMPLATE AND MY VAR IS: vars_file_test_value
Metadata
Release files for jingen 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jingen-0.1.0.tar.gz | 3.5 kB | Without provenance | Details |
Release files / jingen-0.1.0.tar.gz
| Download URL | jingen-0.1.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
905c65191fddebac248c36d165468f7316c4892c7b85a382a5bd363455246904
|
|
BLAKE2b-256 checksum How to use checksums |
ffec6aee05ded82d9ba80ecb5517317cdc6fd0bf4766d3770102c80da669a451
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jingen 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.