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

Uploaded Source

Built Distribution

text_template-0.1.4-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.4.tar.gz.

File metadata

  • Download URL: text_template-0.1.4.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.5.2

File hashes

Hashes for text_template-0.1.4.tar.gz
Algorithm Hash digest
SHA256 287e13261e15f9c0ed2f157343f4d5ece48a1a15d2f071348f387af9b6b761ea
MD5 1a5023a849ddac5acbad268cfdf2f9dd
BLAKE2b-256 726a9091320dbd9c489a1b7676a90ed2995b2ecee525d9bd215161e33ebcd94a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: text_template-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.5.2

File hashes

Hashes for text_template-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 620470cdd55b40af932d48d132ed7500aea81c8ff940bf61fafbc3fbadade3b3
MD5 e05fdb99df1ae7ef34c192ea8c4c5e3e
BLAKE2b-256 1b7541ccc4e72efe7facaec092af0c2c12093856dc4ed0664af4421231efe768

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