variable_loader
File: core/src/utcp/data/variable_loader.py
class VariableLoader
Documentation
Abstract base class for variable loading configurations.
Defines the interface for variable loaders that can retrieve variable values from different sources such as files, databases, or external services. Implementations provide specific loading mechanisms while maintaining a consistent interface.
Attributes
variable_loader_type
: Type identifier for the variable loader.
Fields:
- variable_loader_type: str
Methods:
get(self, key: str) -> Optional[str]
Retrieve a variable value by key.
Args
key
: Variable name to retrieve.
Returns
Variable value if found, None otherwise.
class VariableLoaderSerializer (Serializer[VariableLoader])
No class documentation available
Fields:
- loader_serializers: Dict[str, Type[Serializer[VariableLoader]]]
Methods:
to_dict(self, obj: VariableLoader) -> dict
Convert a VariableLoader object to a dictionary.
Args
obj
: The VariableLoader object to convert.
Returns
The dictionary converted from the VariableLoader object.
validate_dict(self, data: dict) -> VariableLoader
Validate a dictionary and convert it to a VariableLoader object.
Args
data
: The dictionary to validate and convert.
Returns
The VariableLoader object converted from the dictionary.