Pickling Without a File

The examples in the previous section showed how to serialize a Python object directly to a file on disk. But what if you don’t want or need a file? You can also serialize to a bytes object in memory.

Get hands-on with 1200+ tech skills courses.