netunicorn.base.environment_definitions.EnvironmentDefinition

class EnvironmentDefinition(commands=<factory>, runtime_context=<factory>)[source]

Bases: object

A base class for all Environment Definitions.

Parameters:
  • commands (List[str], default: <factory>) – commands that should be executed to create an environment

  • runtime_context (RuntimeContext, default: <factory>)

Attributes

commands

A list of commands that should be executed to create an environment.

runtime_context

Runtime context for this environment definition

Methods

from_json

Creates EnvironmentDefinition from JSON representation.

commands: List[str][source]

A list of commands that should be executed to create an environment.

runtime_context: RuntimeContext[source]

Runtime context for this environment definition

classmethod from_json(data)[source]

Creates EnvironmentDefinition from JSON representation.

Parameters:

data (EnvironmentDefinitionRepresentation) – JSON representation of EnvironmentDefinition

Returns:

EnvironmentDefinition – Deserialized EnvironmentDefinition