- Python package for easy saving and loading in directory organized workspaces. *
To eliminate repetitive plumbing code when saving and loading data in different organizational folders.
pip install datadump
datadump.wd()
returns the working directorydatadump.pwd()
prints the working directory, which by default istmp/
datadump.swd(s)
changes the working directory tos
datadump.save(name, *args, **kwargs)
saves(*args, **kwargs)
to your working directory, and also returns the tuple.datadump.load(name)
returns the tuple stored undername
.
>>> datadump.pwd()
tmp/
>>> datadump.swd('directory')
>>> datadump.save('experiments1', [1,2,3], alpha=0.1, beta=6)
(([1, 2, 3],), {'alpha': 0.1, 'beta': 6})
>>> datadump.load('experiments1')
(([1, 2, 3],), {'alpha': 0.1, 'beta': 6})