runway.config.components.runway package

Runway config components.

class runway.config.components.runway.CfnLintRunwayTestDefinition(data: runway.config.models.runway._builtin_tests.RunwayTestDefinitionModel)[source]

Bases: runway.config.components.runway._test_def.RunwayTestDefinition

Runway cfn-lint test definition.

Instantiate class.

classmethod parse_obj(obj: typing.Any)runway.config.components.runway._test_def.CfnLintRunwayTestDefinition[source]

Parse a python object into this class.

Parameters

obj – The object to parse.

__contains__(name: str)bool

Implement evaluation of ‘in’ conditional.

__getattr__(name: str)

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)

Implement evaluation of self[name].

Parameters

name – The value to look for.

Raises

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

static __new__(cls, data: runway.config.models.runway._builtin_tests.RunwayTestDefinitionModel)runway.config.components.runway._test_def.RunwayTestDefinition

Create a new instance of a class.

Returns

Correct subclass of RunwayTestDefinition for the given data.

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

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

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.

property data

Return the underlying data as a dict.

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

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

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.

class runway.config.components.runway.RunwayDeploymentDefinition(data: runway.config.models.runway.RunwayDeploymentDefinitionModel)[source]

Bases: runway.config.components.runway.base.ConfigComponentDefinition

Runway deployment definition.

Instantiate class.

property menu_entry

Return menu entry representation of this deployment.

property modules

List of Runway modules.

reverse()[source]

Reverse the order of modules and regions.

set_modules(modules: List[Union[RunwayModuleDefinition, RunwayModuleDefinitionModel]])None[source]

Set the value of modules.

Parameters

modules – A list of modules.

Raises

TypeError – The provided value does not match the required types.

__contains__(name: str)bool

Implement evaluation of ‘in’ conditional.

__getattr__(name: str)

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)

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

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

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.

property data

Return the underlying data as a dict.

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

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

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.

classmethod parse_obj(obj: List[Dict[str, Any]])List[RunwayDeploymentDefinition][source]
classmethod parse_obj(obj: Union[List[ConfigProperty], Set[ConfigProperty], Tuple[ConfigProperty, ]])List[RunwayDeploymentDefinition]
classmethod parse_obj(obj: Union[Dict[str, Any], ConfigProperty])runway.config.components.runway._deployment_def.RunwayDeploymentDefinition

Parse a python object into this class.

Parameters

obj – The object to parse.

class runway.config.components.runway.RunwayModuleDefinition(data: runway.config.models.runway.RunwayModuleDefinitionModel)[source]

Bases: runway.config.components.runway.base.ConfigComponentDefinition

Runway module definition.

Instantiate class.

property child_modules

List of child modules.

property is_parent

Assess if the modules contains child modules (e.g. run in parallel).

property menu_entry

Return menu entry representation of this module.

reverse()[source]

Reverse the order of child/parallel modules.

__contains__(name: str)bool

Implement evaluation of ‘in’ conditional.

__getattr__(name: str)

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)

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

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

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.

property data

Return the underlying data as a dict.

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

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.

classmethod parse_obj(obj: typing.Any)runway.config.components.runway._module_def.RunwayModuleDefinition[source]

Parse a python object into this class.

Parameters

obj – The object to parse.

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

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.

class runway.config.components.runway.RunwayTestDefinition(data: runway.config.models.runway._builtin_tests.RunwayTestDefinitionModel)[source]

Bases: runway.config.components.runway.base.ConfigComponentDefinition

Runway test definition.

Instantiate class.

static __new__(cls, data: runway.config.models.runway._builtin_tests.RunwayTestDefinitionModel)runway.config.components.runway._test_def.RunwayTestDefinition[source]

Create a new instance of a class.

Returns

Correct subclass of RunwayTestDefinition for the given data.

classmethod parse_obj(obj: typing.Any)runway.config.components.runway._test_def.RunwayTestDefinition[source]

Parse a python object into this class.

Parameters

obj – The object to parse.

__contains__(name: str)bool

Implement evaluation of ‘in’ conditional.

__getattr__(name: str)

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)

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

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

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.

property data

Return the underlying data as a dict.

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

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

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.

class runway.config.components.runway.RunwayVariablesDefinition(data: runway.config.models.runway.RunwayVariablesDefinitionModel)[source]

Bases: MutableMapping[str, Any]

Runway variables definition.

Instantiate class.

classmethod parse_obj(obj: typing.Any)runway.config.components.runway._variables_def.RunwayVariablesDefinition[source]

Parse a python object into this class.

Parameters

obj – The object to parse.

__bool__()bool

Implement evaluation of instances as a bool.

__contains__(value: typing.Any)bool

Implement evaluation of ‘in’ conditional.

__delitem__(key: str)None

Implement deletion of self[key].

Parameters

key – Attribute name to remove from the object.

Example

__getitem__(key: str)typing.Any

Implement evaluation of self[key].

Parameters

key – Attribute name to return the value for.

Returns

The value associated with the provided key/attribute name.

Raises

AttributeError – If attribute does not exist on this object.

Example

__iter__()Iterator[typing.Any]

Return iterator object that can iterate over all attributes.

Example

__len__()int

Implement the built-in function len().

Example

__setitem__(key: str, value: typing.Any)None

Implement assignment to self[key].

Parameters
  • key – Attribute name to associate with a value.

  • value – Value of a key/attribute.

Example

__str__()str

Return string representation of the object.

clear()None.  Remove all items from D.
clear_found_cache()None

Clear _found_cache.

property data

Sanitized output of __dict__.

Removes anything that starts with _.

find(query: str, default: Optional[typing.Any] = None, ignore_cache: bool = False)typing.Any

Find a value in the map.

Previously found queries are cached to increase search speed. The cached value should only be used if values are not expected to change.

Parameters
  • query – A period delimited string that is split to search for nested values

  • default – The value to return if the query was unsuccessful.

  • ignore_cache – Ignore cached value.

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

Implement evaluation of self.get.

Parameters
  • key – Attribute name to return the value for.

  • default – Value to return if attribute is not found.

items()a set-like object providing a view on D’s items
keys()a set-like object providing a view on D’s keys
pop(k[, d])v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()(k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d])D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F)None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values()an object providing a view on D’s values
class runway.config.components.runway.ScriptRunwayTestDefinition(data: runway.config.models.runway._builtin_tests.RunwayTestDefinitionModel)[source]

Bases: runway.config.components.runway._test_def.RunwayTestDefinition

Runway script test definition.

Instantiate class.

classmethod parse_obj(obj: typing.Any)runway.config.components.runway._test_def.ScriptRunwayTestDefinition[source]

Parse a python object into this class.

Parameters

obj – The object to parse.

__contains__(name: str)bool

Implement evaluation of ‘in’ conditional.

__getattr__(name: str)

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)

Implement evaluation of self[name].

Parameters

name – The value to look for.

Raises

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

static __new__(cls, data: runway.config.models.runway._builtin_tests.RunwayTestDefinitionModel)runway.config.components.runway._test_def.RunwayTestDefinition

Create a new instance of a class.

Returns

Correct subclass of RunwayTestDefinition for the given data.

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

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

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.

property data

Return the underlying data as a dict.

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

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

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.

class runway.config.components.runway.YamlLintRunwayTestDefinition(data: runway.config.models.runway._builtin_tests.RunwayTestDefinitionModel)[source]

Bases: runway.config.components.runway._test_def.RunwayTestDefinition

Runway yamllint test definition.

Instantiate class.

classmethod parse_obj(obj: typing.Any)runway.config.components.runway._test_def.YamlLintRunwayTestDefinition[source]

Parse a python object into this class.

Parameters

obj – The object to parse.

__contains__(name: str)bool

Implement evaluation of ‘in’ conditional.

__getattr__(name: str)

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)

Implement evaluation of self[name].

Parameters

name – The value to look for.

Raises

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

static __new__(cls, data: runway.config.models.runway._builtin_tests.RunwayTestDefinitionModel)runway.config.components.runway._test_def.RunwayTestDefinition

Create a new instance of a class.

Returns

Correct subclass of RunwayTestDefinition for the given data.

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

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

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.

property data

Return the underlying data as a dict.

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

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

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.