jinjasubst
What does it do?
Renders the stdin as a Jinja2 template, with the current environment variables as arguments.
Installation
pip install jinjasubst
or:
pipx install jinjasubst
Usage examples
# Format a template file
jinjasubst < kubernetes.yml | kubectl apply -f -
# Format from file path
jinjasubst -i kubernetes.yml -o rendered.yml
# Using shortened versions
jsubst -i kubernetes.yml > rendered.yml
jenvsubst -i kubernetes.yml > rendered.yml
j2subst -i kubernetes.yml > rendered.yml
j2envsubst -i kubernetes.yml > rendered.yml
# Using the shell global
jinjasubst -s <<'EOF'
Hello {{ USER }}, the date is {{ shell("date") }}
EOF
# Using the shell filter
jinjasubst -s <<'EOF'
Hello {{ USER }}, your reversed name is {{ USER | shell("rev") }}
EOF
Usage in development
python3 -m src.jinjasubst.cli -s <<'EOF'
Hello {{ USER }}, it is {{ shell("date") }}
EOF
Metadata
Release files for jinjasubst 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 | Actions |
|---|---|---|---|---|
| jinjasubst-0.1.0.tar.gz | 3.6 kB | Without provenance | Details for jinjasubst-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jinjasubst-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for jinjasubst-0.1.0-py3-none-any.whl |
Total release size: 7.4 kB
Release files / jinjasubst-0.1.0.tar.gz
| Download URL | jinjasubst-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75f6e76dac0aa1f4f092a65251bf37c4b8e357e86f6a87568a92da16279e6532
|
|
BLAKE2b-256 checksum How to use checksums |
01e3b3f9fd2448594999b55d26d3cd5c3e9533c8b3cc62c09cf31f55da4535f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / jinjasubst-0.1.0-py3-none-any.whl
| Download URL | jinjasubst-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c5d70eb8c3e610bab268d8ccbb5fc96324a8955436d0c2317282e059011002f
|
|
BLAKE2b-256 checksum How to use checksums |
80905e38b844f17594be89d6b8d60b855ce1982c247939e5b872f22f2805b788
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for jinjasubst 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.