Wrapper to jinja2 template system
Project description
Intoduction
This project allows you to gnerate a file from a jinja2 template file
Installation
pip install template-formatter
Motivating example
Often you need to create a file or a string according to a specific template. When you need to perform it in python, it is all fine and dandy. However, the problem arises when you are dealing with a different programming language (e.g., C, Latex) that can perform said task, but in a much less easy way. You can use this program to easiluy template files and string and then use them inside another environment.
Usage
This executable allows to customize templated strings or file according some criterion.
I have intended this application to be just a wrapper to jinja2. However, you can also pass a string
to the program according to other template syntaxes (e.g., f-strings or python format
).
See the tests for usages of this program. Here there is a non comprehensive ways to use this program
template-formatter --version
template-formatter --help
template-formatter --format="format" --writeOnStdout --value "foo" 3 --value "bar" 5 "{model.foo} + {model.bar}"
For the developer
pip install -i https://test.pypi.org/simple/ pmake
pmake build install
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 Distributions
Built Distribution
File details
Details for the file template_formatter-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: template_formatter-1.4.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c76119a49c89bf8ce169a7097f1d4b4a815f7c7aa852183b46146a1de582e4ea |
|
MD5 | 4c6fbd093983e76bd8a08b9453755fe0 |
|
BLAKE2b-256 | a99f663cfaf79f7b78daebe7b4c198dfdfe56fd034d96de2a58a57c2ef2ce28f |