Skip to main content

Cherrypy’s Mako Plugin

CherrypyMako is a cherrypy plugin that provides Mako template engine , within cherrypy as a tool.

Example:

demo.py:

import os.path
import cherrypy
import CherrypyMako
import datetime
CherrypyMako.setup()
root_dir = os.path.abspath( os.path.dirname(__file__))

class Root(object):

    @cherrypy.expose
    @cherrypy.tools.mako(filename='index.html')
    def index(self):
        return {'currentTime':datetime.datetime.now()}


_cp_config={
    'global':{
        'server.socket_host'  : '0.0.0.0',
        'server.socket_port'  : 1919,
        'tools.mako.directories' : [os.path.join(root_dir,'templates')],
    },
}

if __name__ == '__main__':
    cherrypy.quickstart(Root(), '', config=_cp_config)

index.html:

<html>
        <head>
                <title>Cherrypy Mako Tool Demo</title>
        </head>
        <body>
                ${currentTime}
        </body>
</html>

Metadata

Release files for CherrypyMako 0.3.1

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

Source distribution (sdist)

Source distribution for CherrypyMako 0.3.1
File Size Uploaded Provenance
CherrypyMako-0.3.1.tar.gz 2.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for CherrypyMako 0.3.1
File Interpreter ABI Platform
CherrypyMako-0.3.1-py2.7.egg Legacy Egg format - - Details

Total release size: 6.7 kB

Release files / CherrypyMako-0.3.1.tar.gz

Download URL CherrypyMako-0.3.1.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
433bb9ff2558fe36bc4a51adeb739e6d6c2a61a86ec1d81fcd47e29928e88f2e
BLAKE2b-256 checksum
How to use checksums
604da80f62ccd0b389c97792fadce6220a5810bd9ed15cde986275958fa7ff1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / CherrypyMako-0.3.1-py2.7.egg

Download URL CherrypyMako-0.3.1-py2.7.egg
Size 4.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
ede396b8233c739d3dd455a9cf7d7a352e7e4cd517b8bd46fc3dc99813277a72
BLAKE2b-256 checksum
How to use checksums
b2da2d169b4006d6323c452f10427f805f0bb93c427cc64147a0880c291be054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for CherrypyMako 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files No provenance

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