Skip to main content

Very simple text templating view for Python

Project description

TextTemplate
========

Very simple text templating views for Python

Uses colour variables from AnsiColours package to style text.

Installation
------------

Install by running:

pip install text_template

Usage
-----

from text_template import TextTemplate as view

print(view.render(
template='./a_view.txt',
variable="two",
another_variable='three'
))

The view uses `$` and `${}` to parse the variables passed to the template for example:

# a_view.txt

One, $variable and ${another_variable}
New line here

License
-------

The project is licensed under the MIT license.

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
text_template-0.1.4-py2.py3-none-any.whl (2.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3
text_template-0.1.4.tar.gz (2.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page