Skip to main content

CherryPy-Jinja2

CherryPy-Jinja2 is a simple CherryPy Tool to render output via Jinja2 templates.

Import cherrypy_jinja2 to make the tool available in CherryPy's default toolbox.

Set tools.jinja2.search_path to a directory containing Jinja2 template files, then attach the tool to exposed methods:

class Root:
    @cherrypy.expose
    @cherrypy.tools.jinja2(template="index.html")
    def index(self):
        return {'message': "Hello"}

Metadata

Release files for cherrypy-jinja2 2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cherrypy-jinja2 2.2
File Size Uploaded
cherrypy-jinja2-2.2.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cherrypy-jinja2 2.2
File Interpreter ABI Platform
cherrypy_jinja2-2.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / cherrypy-jinja2-2.2.tar.gz

Download URL cherrypy-jinja2-2.2.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
333ca4170bdc094d0dc93a58ea61770bae9bcafbfd8db82bb36f32e1defc6b0b
BLAKE2b-256 checksum
How to use checksums
9f76b1de0408ec5cae50598b2634a823cc75becfd4ff91f8bfd0bf9042d39b2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.9

Release files / cherrypy_jinja2-2.2-py3-none-any.whl

Download URL cherrypy_jinja2-2.2-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8adf8a189a39eed39a3e5a6fabdf512500971e370733e3ac90e377586ba51285
BLAKE2b-256 checksum
How to use checksums
296e283bf3b2d47f2732d25cb81753a18592c0fdb2105aeeb3bd3a2653fb6482
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.9

Release history Release notifications | RSS feed

This release

2.2 This release

2 release files

1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page