TOSCAExporter#

class eclypse.io.defaults.tosca.TOSCAExporter[source]#

Bases: GraphExporter[AssetGraph, dict[str, Any]]

Exporter for TOSCA Simple Profile YAML service templates.

Methods

to_data(graph, *[, context])

Convert an ECLYPSE graph into TOSCA data.

write_data(data, target, *[, context])

Write TOSCA data to a YAML file.

to_data(graph, *, context=None)[source]#

Convert an ECLYPSE graph into TOSCA data.

Parameters:
  • graph (AssetGraph) – The graph to export.

  • context (IOContext | None) – Optional import/export customisation.

Returns:

TOSCA Simple Profile YAML-compatible data.

Return type:

dict[str, Any]

write_data(data, target, *, context=None)[source]#

Write TOSCA data to a YAML file.

Parameters:
  • data (dict[str, Any]) – TOSCA Simple Profile YAML-compatible data.

  • target (str | Path) – The target YAML path.

  • context (IOContext | None) – Optional import/export customisation.

Return type:

None