Module rabibridge.serialisation
Functions
def get_serialisation_handler(mode: Literal['json', 'pickle', 'msgpack']) ‑> Tuple[Callable[..., bytes], Callable[..., Any]]
-
Get serialisation handler for different modes, which can be defined in the configuration file.
Note
Since pickle has serialisation security issues in the python environment, we usually recommend using msgpack. json serialised data is larger in size in comparison. If you use json as a serialisation and deserialisation tool, you can use higher performance implementations such as ujson or orjson. at the same time, another problem with json is that you can't serialise bytes string directly.