Vars collector and template runner.
Project description
c2c.template
Supported template Jinja, Mako, Template.
Tools that collect some vars and get them to a template engine.
Supported template: Jinja, Mako and Template.
Use c2c-template --help to get the command line help.
Vars file
The vars collector gets the vars from YAML files like this one:
extends: inherit.yaml
vars:
string_var: a string
int_var: 42
interpreted_var: __import__('datetime').date.today()
combined_var: 'Today: {interpreted_var:%Y-%m-%d}'
interpreted-vars:
- interpreted_var
The inherit.yaml is an other file with the same syntax that will provide initial vars.
The vars section is where we define the vars values, the YAML files support typing, than 42 will be an integer.
The interpreted-vars is a list of variable that the value will be interpreted, than the interpreted_var will have the value 4, See: eval().
The combined_var reuse a predefined variable and format, See: str.format().
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
File details
Details for the file c2c.template-1.0.0dev-20141211.tar.gz
.
File metadata
- Download URL: c2c.template-1.0.0dev-20141211.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 408257ca4cc02fef03045d909949e929d110c306ee2d69eb9cc42d315d96e32b |
|
MD5 | e935c5743b1495128a91bbb4c5b142b9 |
|
BLAKE2b-256 | fc294f0611befce1c6caa818cb27f3bced4f99f4ab8819b51f9647b7c6a35008 |