DockerComposeImporter#

class eclypse.io.defaults.docker_compose.DockerComposeImporter[source]#

Bases: GraphImporter[Application, dict[str, Any]]

Importer for Docker Compose application files.

Methods

from_data(data, *[, kind, context])

Convert Docker Compose data into an application.

read_data(source, *[, context])

Read Docker Compose data from a YAML file.

read_data(source, *, context=None)[source]#

Read Docker Compose data from a YAML file.

Parameters:
  • source (str | Path) – The source YAML path.

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

Returns:

The decoded Docker Compose data.

Return type:

dict[str, Any]

from_data(data, *, kind=None, context=None)[source]#

Convert Docker Compose data into an application.

Parameters:
  • data (dict[str, Any]) – Docker Compose-compatible data.

  • kind (GraphKind | None) – Optional graph kind requested by the caller.

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

Returns:

The imported application.

Return type:

Application

Raises:

ValueError – If a non-application graph kind is requested.