I\'m new in python and i wanted to know if there is a solution for this problem:
I know that this may sound strange but i want to save the pickle.dump data into a va
Here are the code snippets using pickle.dump() in case you need:
Dumping from pickle_obj to bytes/string variable
bytes_output = BytesIO()
pickle.dump(pickle_obj, model_bytes)
bytes_output_base64 = base64.b64encode(model_bytes.getvalue()).decode() # convert the bytes to base64 string
bytes_output.close()
Loading from a base64 string in pickle_data to pickle_obj
pickle_bytes = BytesIO(base64.b64decode(pickle_data))
pickle_obj = pickle.loads(pickle_bytes.read())
pickle_bytes.close()
Hope it helps!