Skip to content

pklemenkov/pymtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyMTT

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

About

Python multipurpose text transformer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published