ApplicationContext#

class eclypse.io.context.ApplicationContext[source]#

Bases: IOContext

Customisation context for application import and export.

Parameters:
  • strict (bool) – Whether imported nodes and edges should be validated strictly. Defaults to True, matching Application through AssetGraph.

  • include_default_assets (bool) – Whether the imported application should include default assets when the format does not carry asset definitions. Defaults to False, matching Application.

  • requirement_init (InitPolicy) – Requirement initialisation policy used when a format does not carry one. Defaults to "min", matching Application.

  • services (dict[str, type[Service]]) – Service classes used when an application importer needs to instantiate service implementations.

Methods

__init__([node_assets, edge_assets, ...])

get_service(name)

Return a registered service class.

Attributes

strict: bool#
include_default_assets: bool#
requirement_init: InitPolicy#
services: dict[str, type[Service]]#
get_service(name)[source]#

Return a registered service class.

Parameters:

name (str) – The service registry name.

Returns:

The registered service class.

Return type:

type[Service]

Raises:

ValueError – If no service is registered with the given name.

__init__(node_assets=None, edge_assets=None, update_policies=None, seed=None, strict=True, include_default_assets=False, requirement_init='min', services=<factory>)#
Parameters:
  • node_assets (dict[str, Asset] | None)

  • edge_assets (dict[str, Asset] | None)

  • update_policies (UpdatePolicies)

  • seed (int | None)

  • strict (bool)

  • include_default_assets (bool)

  • requirement_init (InitPolicy)

  • services (dict[str, type[Service]])

Return type:

None