Skip to main content

Command-line Text Transformer

Project description

PyMTT is a command-line text transformer. It allows you to render Jinja2 templates using context created from pure Python modules or shell environment variables. Primary usage is config generation for deployment.

PyMTT was inspired by Oleg Mamontov’s MTT but uses Python, not Perl.

Example usage

export DJANGO_SETTINGS_MODULE=settings_test
pymtt -e -d -b config.py ~/template.proto ~/template

This command creates context from settings_test Django module (-d switch), overwrites it with config.py and finally overwrites context with environment variables if any (-e switch). Then uses context to render template out of template.proto.

Installation

pip install pymtt

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

pymtt-0.1.3.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file pymtt-0.1.3.tar.gz.

File metadata

  • Download URL: pymtt-0.1.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymtt-0.1.3.tar.gz
Algorithm Hash digest
SHA256 791e0b39e083e62c998c8023a133d7077f09486e478fdecf012b1c5187d62348
MD5 b1f7543a090649e1c671be09fb39f661
BLAKE2b-256 f4fd12a9a04ab16e020e4aa6bd58d08bcd352b3646cb0702c461c1b033000314

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page