FileGen

Universal text file generator

FileGen is a text file generator that uses Jinja templates and YAML files to create files. I created it because I kept running into the same problem, the need to have a template tool to create config files, kickstarts, etc that did not rely on tools like ansible or puppet. I just needed to take a namespace from YAML/JSON files and Jinja templates (my language of choice) to render text files.

Namespace inheritance

FileGen can use multiple parameter files to load a chain into a single namespace when it comes time to render. This is useful for things like kickstarts that have one template that has a bunch of global parameters captured in it that are site-wide and also a host parameters file that will only add the bits specific to that host. This allows for clean, hierarchical parameters.

Installation

The installation is simple enough from git, using standard setuptools conventions. I will be publishing on PYPI as “FileGenerator” soon as well. Try it out. Let me know what you think. I have the code up at https://github.com/JosiahKerley/python-filegen and it can be installed with pip install https://github.com/JosiahKerley/python-filegen/archive/master.zip.