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.

Source Distribution

text_template-0.1.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

text_template-0.1.1-py2.py3-none-any.whl (2.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file text_template-0.1.1.tar.gz.

File metadata

File hashes

Hashes for text_template-0.1.1.tar.gz
Algorithm Hash digest
SHA256 073ae7bf7bd0caaeef79a0d163e957bbe841ebdbb47b0a8bc6bd245c977cfcdb
MD5 720ab0ad0a3a85e49f0fad9b5bab7b68
BLAKE2b-256 fc32abe6511d9b4059e8545f474845f128c4a77fc827f08cc7d7eed39408e573

See more details on using hashes here.

File details

Details for the file text_template-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for text_template-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 da9d85a83858129da5a3360b6240af2a96b80cba121836238681a2fadd582dd7
MD5 6aadf461c3db987337863b2854d09f09
BLAKE2b-256 b24ec4c3f6402fd6b622e4258bdbeb00c1b81d3b9b7dd26f79a93e1a13606bb5

See more details on using hashes here.

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