buildingmotif.api.views.template#

Functions

evaluate_bindings(template_id)

evaluate template with giving binding

evaluate_ingress(template_id)

get_all_templates()

Get all templates.

get_bindings(binding_dict)

type binding_dict values to nodes

get_template(templates_id)

Get template by id.

get_all_templates() Response[source]#

Get all templates.

Returns:

all templates

Return type:

flask.Response

get_template(templates_id: int) Response[source]#

Get template by id.

Parameters:

templates_id (int) – template id

Returns:

requested template

Return type:

flask.Response

evaluate_ingress(template_id: int) Response[source]#
evaluate_bindings(template_id: int) Response[source]#

evaluate template with giving binding

Parameters:

template_id (int) – id of template

Returns:

evaluated Group

Return type:

flask.Response

get_bindings(binding_dict) Dict[str, Node][source]#

type binding_dict values to nodes

given:

{name: {@id or @literal: value}}

return:

{name: typed value}

Parameters:

binding_dict (dict) – untyped bindings

Returns:

typed dict

Return type:

Dict[str, Node]