def template_file(path=None, template_contents=None, template_source=None, context=None, **kwargs):
    if template_contents is None:
        with open(template_source) as template_file:
            template_contents = template_file.read()

    if context is None:
        context = {}

    file(path=path, contents=template_contents % context, **kwargs)
Require a file whose contents is defined by a template.
dataset/ETHPy150Open ronnix/fabtools/fabtools/require/files.py/template_file