Template Engine
Template engine for rendering project files.
- pypreset.template_engine.get_templates_dir()[source]
Get the directory containing built-in templates.
- Return type:
- pypreset.template_engine.create_jinja_environment()[source]
Create a Jinja2 environment with the templates directory.
- Return type:
Environment
- pypreset.template_engine.get_template_context(config)[source]
Build the template context from a project configuration.
- Parameters:
config (
ProjectConfig)- Return type:
- pypreset.template_engine.render_template(env, template_name, context)[source]
Render a template with the given context.