riceric22 / datadump

Python package for fast and easy saving and loading of organized work.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

datadump • Build Status License

  • Python package for easy saving and loading in directory organized workspaces. *

Why?

To eliminate repetitive plumbing code when saving and loading data in different organizational folders.

Install

pip install datadump

Usage

  • datadump.wd() returns the working directory
  • datadump.pwd() prints the working directory, which by default is tmp/
  • datadump.swd(s) changes the working directory to s
  • datadump.save(name, *args, **kwargs) saves (*args, **kwargs) to your working directory, and also returns the tuple.
  • datadump.load(name) returns the tuple stored under name.

Example

>>> 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})

About

Python package for fast and easy saving and loading of organized work.

License:Apache License 2.0


Languages

Language:Python 100.0%