Serialization
Pickle
SmartMixin.loadsConfig
loadsConfig(bytes: bytes) -> Config
Deserialize a Config object from a bytes object using the pickle module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bytes |
bytes
|
A bytes object containing a serialized Config object. |
required |
Returns:
Name | Type | Description |
---|---|---|
Config |
Config
|
The deserialized Config object. |
Source code in SmartMixin/serialization.py
SmartMixin.dumpsConfig
dumpsConfig(config: Config) -> bytes
Serialize a Config object into a bytes object using the pickle module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
Config
|
The Config object to be serialized. |
required |
Returns:
Name | Type | Description |
---|---|---|
bytes |
bytes
|
The serialized Config object. |