save¶
- save(obj, file: str | Path) None ¶
Save an object to a compressed file
Essentially, this is just a wrapper for
pickle.dump()
with a few conveniences, like default pickle protocol 4 and gzip compression. The ‘.pbz’ extension will be added if file has none.- Parameters:
- objAny
Object to be saved.
- fileUnion[str, pathlib.Path]
May be a
str
, apathlib
object or a file object created withopen()
.