Skip to main content

charms.templating.jinja2 badge

Helper for rendering Jinja2 templates with charms

Usage

from charms.templating.jinja2 import render

render('app.conf.j2', '/etc/app.conf', {
    'my_var': 'my_val',
})

output = render(
    'tmpl.j2',
    tests={
        'isnumeric': lambda s: s.isnumeric(),
    })

output = render(
    template='{{ config["my-opt"]|my_upper }}',
    filters={
        'my_upper': lambda s: s.upper(),
    })

The full documentation is available at http://pythonhosted.org/charms.templating.jinja2/

Download files

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

Source Distribution

charms.templating.jinja2-1.0.2.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file charms.templating.jinja2-1.0.2.tar.gz.

File metadata

File hashes

Hashes for charms.templating.jinja2-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8193c6a1d40bdb66fe272c359b4e4780501c658acfaf2b1118c4230927815fe2
MD5 30b35e457f2bdd3d306ade56701a2186
BLAKE2b-256 6a797e2beeb4d5659134fca37a7e7ad4cad6aa10e9f4eb63106c74e4abf899c8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 file

1.0.1

1 file

1.0.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page