runway.config.components.runway package

Runway config components.

class runway.config.components.runway.CfnLintRunwayTestDefinition[source]

Bases: runway.config.components.runway._test_def.RunwayTestDefinition[runway.config.models.runway._builtin_tests.CfnLintRunwayTestDefinitionModel]

Runway cfn-lint test definition.

__init__(data: runway.config.models.runway._builtin_tests.CfnLintRunwayTestDefinitionModel) None[source]

Instantiate class.

classmethod parse_obj(obj: 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.components.runway._test_def._DataModel) runway.config.components.runway._test_def.RunwayTestDefinition[runway.config.components.runway._test_def._DataModel]

Create a new instance of a class.

Returns

Correct subclass of RunwayTestDefinition for the given data.

__setattr__(name: str, value: 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: 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: Dict[str, Any]

Return the underlying data as a dict.

get(name: str, default: Optional[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[source]

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

Runway deployment definition.

__init__(data: runway.config.models.runway.RunwayDeploymentDefinitionModel) None[source]

Instantiate class.

property menu_entry: str

Return menu entry representation of this deployment.

property modules: List[runway.config.components.runway._module_def.RunwayModuleDefinition]

List of Runway modules.

reverse()[source]

Reverse the order of modules and regions.

set_modules(modules: List[Union[runway.config.components.runway._module_def.RunwayModuleDefinition, runway.config.models.runway.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.

__new__(**kwargs)
__setattr__(name: str, value: 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: 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: Dict[str, Any]

Return the underlying data as a dict.

get(name: str, default: Optional[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[runway.config.components.runway._deployment_def.RunwayDeploymentDefinition][source]
classmethod parse_obj(obj: Union[List[ConfigProperty], Set[ConfigProperty], Tuple[ConfigProperty, ...]]) List[runway.config.components.runway._deployment_def.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[source]

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

Runway module definition.

__init__(data: runway.config.models.runway.RunwayModuleDefinitionModel) None[source]

Instantiate class.

property child_modules: List[runway.config.components.runway._module_def.RunwayModuleDefinition]

List of child modules.

property is_parent: bool

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

property menu_entry: str

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.

__new__(**kwargs)
__setattr__(name: str, value: 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: 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: Dict[str, Any]

Return the underlying data as a dict.

get(name: str, default: Optional[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: 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[source]

Bases: Generic[runway.config.components.runway._test_def._DataModel], runway.config.components.runway.base.ConfigComponentDefinition

Runway test definition.

__init__(data: runway.config.components.runway._test_def._DataModel) None[source]

Instantiate class.

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

Create a new instance of a class.

Returns

Correct subclass of RunwayTestDefinition for the given data.

classmethod parse_obj(obj: Any) runway.config.components.runway._test_def.RunwayTestDefinition[runway.config.components.runway._test_def._DataModel][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: 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: 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: Dict[str, Any]

Return the underlying data as a dict.

get(name: str, default: Optional[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[source]

Bases: runway.utils.MutableMap

Runway variables definition.

__init__(data: runway.config.models.runway.RunwayVariablesDefinitionModel) None[source]

Instantiate class.

classmethod parse_obj(obj: 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: 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) 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[Any]

Return iterator object that can iterate over all attributes.

Example

__len__() int

Implement the built-in function len().

Example

__new__(**kwargs)
__setitem__(key: str, value: 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: Dict[str, Any]

Sanitized output of __dict__.

Removes anything that starts with _.

find(query: str, default: Optional[Any] = None, ignore_cache: bool = False) 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[Any] = None) 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[source]

Bases: runway.config.components.runway._test_def.RunwayTestDefinition[runway.config.models.runway._builtin_tests.ScriptRunwayTestDefinitionModel]

Runway script test definition.

__init__(data: runway.config.models.runway._builtin_tests.ScriptRunwayTestDefinitionModel) None[source]

Instantiate class.

classmethod parse_obj(obj: 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.components.runway._test_def._DataModel) runway.config.components.runway._test_def.RunwayTestDefinition[runway.config.components.runway._test_def._DataModel]

Create a new instance of a class.

Returns

Correct subclass of RunwayTestDefinition for the given data.

__setattr__(name: str, value: 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: 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: Dict[str, Any]

Return the underlying data as a dict.

get(name: str, default: Optional[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[source]

Bases: runway.config.components.runway._test_def.RunwayTestDefinition[runway.config.models.runway._builtin_tests.YamlLintRunwayTestDefinitionModel]

Runway yamllint test definition.

__init__(data: runway.config.models.runway._builtin_tests.YamlLintRunwayTestDefinitionModel) None[source]

Instantiate class.

classmethod parse_obj(obj: 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.components.runway._test_def._DataModel) runway.config.components.runway._test_def.RunwayTestDefinition[runway.config.components.runway._test_def._DataModel]

Create a new instance of a class.

Returns

Correct subclass of RunwayTestDefinition for the given data.

__setattr__(name: str, value: 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: 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: Dict[str, Any]

Return the underlying data as a dict.

get(name: str, default: Optional[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.

Submodules