components.template.api

Template API

components.template.api.delete(template)

Delete the template.

Returns:

components.template.api.get(template_id)

Get a template.

Parameters:template_id

Returns:

components.template.api.get_all(is_cls=True)

List all templates.

Returns:

components.template.api.get_all_by_hash(template_hash)

Return all template having the given hash.

Parameters:template_hash – Template hash.
Returns:List of Template instance.
components.template.api.get_all_by_hash_list(template_hash_list)

Return all template having the given hash list.

Parameters:template_hash_list – Template hash list.
Returns:List of Template instance.
components.template.api.get_all_by_id_list(template_id_list)

Returns all template with id in list

Parameters:template_id_list

Returns:

components.template.api.get_all_templates_by_dependencies(dependency_id_list)

List all templates having the given dependencies.

Parameters:dependency_id_list – List of dependency ids.
Returns:List of templates.
components.template.api.init_template_with_dependencies(template, dependencies_dict)

Initialize template content and dependencies from a dictionary.

Parameters:
  • template
  • dependencies_dict

Returns:

components.template.api.set_display_name(template, display_name)

Set template display name.

Parameters:
  • template
  • display_name

Returns:

components.template.api.upsert(template)

Save or Updates the template.

Parameters:template

Returns: