Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c2c.template-1.0.0.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file c2c.template-1.0.0.tar.gz.

File metadata

File hashes

Hashes for c2c.template-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9c1370efca106964626eb4f98615abfb86aa9c931833a10e98d6d7eb0952be30
MD5 0095d5e8f4c7ecd92b27f76e697caba1
BLAKE2b-256 b17d76f7374d66836b024fb9141005a5f99e5fa59ce79d3519860b3acaebc45b

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page