runway.config.components.runway.base module

Runway config base definition.

class runway.config.components.runway.base.ConfigComponentDefinition(data: ConfigProperty)[source]

Bases: object

Base class for Runway config components.

Instantiate class.

property data

Return the underlying data as a dict.

get(name: str, default: Optional[typing.Any] = None)None[source]

Get a value or return default if it is not found.

Parameters
  • name – The value to look for.

  • default – Returned if no other value is found.

resolve(context: RunwayContext, *, pre_process: bool = False, variables: Optional[RunwayVariablesDefinition] = None)None[source]

Resolve variables.

Parameters
  • context – Runway context object.

  • pre_process – Whether to only resolve pre-process fields.

  • variables – Object containing values to resolve the var lookup.

abstract classmethod parse_obj(obj: typing.Any)runway.config.components.runway.base.ConfigComponentDefinition[source]

Parse a python object into this class.

Parameters

obj – The object to parse.

__contains__(name: str)bool[source]

Implement evaluation of ‘in’ conditional.

__getattr__(name: str)[source]

Implement evaluation of self.name.

Parameters

name – The value to look for.

Raises
  • AttributeError – Object does not contain an attribute for the name provided.

  • UnresolvedVariable – The value being access is a variable and it has not been resolved yet.

__getitem__(name: str)[source]

Implement evaluation of self[name].

Parameters

name – The value to look for.

Raises

KeyError – Object does not contain a field of the name provided.

__setattr__(name: str, value: typing.Any)None[source]

Implement evaluation of self.name = value.

When setting an attribute, the value is set on the underlying data model. The exception to this is if the name starts with an underscore.

Parameters
  • name – The value to set.

  • value – The value to assigned to the field.

Raises

AttributeError – The name being set is a property without a setter.

__setitem__(name: str, value: typing.Any)None[source]

Implement evaluation of self[name] = value.

When setting an attribute, the value is set on the underlying data model. The exception to this is if the name starts with an underscore.

Parameters
  • name – The value to set.

  • value – The value to assigned to the field.