Template support for flask application
Project description
Template support for flask application
Quickstart
Install flask_template_support using pip:
$ pip install Flask-TemplateSupport
Example usage
from flask import render_template
from flask_template_support import TemplateSupport
def test_sum(a, b):
return a + b
def test_sub(a, b):
return a - b
app = Flask(__name__)
ts = TemplateSupport()
ts.init_app(app, functs=(
(test_sum, 'sum'),
(test_sub, 'sub'),
))
Run test.py in example folder and go to http://127.0.0.1:5000/ to see how it works
License MIT
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
File details
Details for the file Flask-TemplateSupport-1.0.2.tar.gz
.
File metadata
- Download URL: Flask-TemplateSupport-1.0.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8389c5ef8ab72bc0e68ca14230637ae03b58ef381fac88f93510d6b62841b405 |
|
MD5 | 6d993dbb55213b0eb443c55fae5c1cc7 |
|
BLAKE2b-256 | 1b7fd5e0bd9441b7b24142a21ebbc1ca5b6cbea05a74f7f81689d9bd6b2c6ab6 |