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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pymtt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 03793046e6b168d794557d17e7823f250412612b3b2695f4b073d32c591b6154
MD5 5a04ea2b0c4d50e1f2d54f5c0158fd4a
BLAKE2b-256 df813325f9d49b3ef574bc1cef1693a7349179b6d082dd3ab1cc07ec85a39a4f

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