runway.config.components.runway.base module
Runway config base definition.
- class runway.config.components.runway.base.ConfigComponentDefinition[source]
Bases:
abc.ABC
Base class for Runway config components.
- __init__(data: ConfigProperty) None [source]
Instantiate class.
- get(name: str, default: Optional[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: Any) runway.config.components.runway.base.ConfigComponentDefinition [source]
Parse a python object into this class.
- Parameters
obj – The object to parse.
- __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.
- __new__(**kwargs)
- __setattr__(name: str, value: 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: 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.