runway.config.components.runway.base module¶
Runway config base definition.
- class runway.config.components.runway.base.ConfigComponentDefinition[source]¶
Bases:
ABC
,Generic
[_ConfigPropertyTypeVar
]Base class for Runway config components.
- __getattr__(name: str) Any [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) Any [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: 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.
- get(name: str, default: 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.
- abstract classmethod parse_obj(obj: object) Self [source]¶
Parse a python object into this class.
- Parameters:
obj – The object to parse.
- resolve(context: RunwayContext, *, pre_process: bool = False, variables: RunwayVariablesDefinition | None = 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.