buildingmotif.model_builder#
Classes
|
A context for building templates. |
|
- class TemplateBuilderContext(ns: Namespace, store: Optional[Union[Store, str]] = None)[source]#
A context for building templates. This class allows the user to add templates to the context and then access them by name. The context also allows the user to compile all of the templates in the context into a single graph.
- add_template(template: Template)[source]#
Adds a template to the context with all of its dependencies inlined. Allows the user of the context to access the template by name.
- Parameters:
template – The template to add to the context