maci.pickleloadbytes
load pickled bytes
loading a byte string
Load object data from pickled byte string.
Security awareness, only unpickle data you trust and review considerations for unpickling data. See more information at pickle section
maci.pickleloadbytes -> Any
Basic Example of loading a pickle object from byte string using default positional parameter
In this example, we simply load pickled data using the pickleloadbytes function and pass a byte string as an argument to the function to load the pickled data, and assign the returned data to a variable.
combining pickle with maci to store data to file
To store pickled data to a file, it is more encouraged to store it as a byte string value rather than a whole executable pickle file. The byte string itself is not executable yet as it is stored as a value that can be safely tested (using your own means) before loading it. This approach enables the ability to still store your pickle data to a file as an alternative, and control what byte data is coming in instead of just loading/executing a whole pickle file.
See pickledumpbytes for example on dumping pickled to a file paired with maci
partner functions
Functions that are related for pickleloadbytes
maci.pickledumpbytes -> Dump data to pickled bytes
parameters & arguments
Describes all parameter functionality and accepted data types
This uses the native pickle library shipped with the python standard library for its underlying functionality. For more information on the pickle library and official security concerns with pickling, visit: https://docs.python.org/3/library/pickle.html
Last updated