Portable
- class ioiocore.portable.Portable(**kwargs)[source]
Bases:
Interface
A class representing a portable object, inheriting from Interface. Handles configuration, implementation, and serialization of the portable object.
- class Configuration(id='TBG', **kwargs)[source]
Bases:
Configuration
Configuration class for the Portable.
- Parameters:
id (str)
- ID
The key for the portable object ID.
- Type:
str
- __init__(**kwargs)[source]
Initializes the Portable object.
- Parameters:
**kwargs – Additional keyword arguments for further configuration.
- static add_preinstalled_module(module)[source]
Adds a preinstalled module for the Portable object.
- Parameters:
module (str) – The name of the module to be added.
-
config:
Configuration
- create_config(**kwargs)[source]
Factory method to create the configuration for the Portable object.
- Parameters:
**kwargs – Additional keyword arguments for configuring the Portable object.
- create_implementation(**kwargs)[source]
Factory method to create the implementation for the Portable object.
- Parameters:
**kwargs – Additional keyword arguments for implementing the Portable object.
- static deserialize(data)[source]
Deserializes a Portable object from a dictionary.
- Parameters:
data (dict) – The dictionary containing the serialized data.
- Returns:
The deserialized Portable object.
- Return type:
- static get_by_id(id)[source]
Retrieves a Portable object by its ID.
- Parameters:
id (str) – The ID of the Portable object.
- Returns:
The Portable object with the given ID.
- Return type: