Skip to main content

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 if 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

Flask-TemplateSupport-1.0.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

Flask_TemplateSupport-1.0.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

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