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.2.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

text_template-0.1.2-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.2.tar.gz.

File metadata

File hashes

Hashes for text_template-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fdbfa2e6dc3959c0fb26a731d412599d4078d388d664c94bb319c58860569295
MD5 84728af5f6c35565ee69caf36ed220d5
BLAKE2b-256 4ca2def05594a43e431223abcee0300fa83af07ed49ea10c48e8038e35ad416c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for text_template-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 666e726d4f88c819546f7efd999ca9d5af025f3b460a0426f5001ac7af70392f
MD5 baec8f73e616d96515868d3bebabdb1f
BLAKE2b-256 a8c50de081d63b5686d95efc755665b1ae91949dadb4eb5a9e499934fd88151a

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