Dict-like object that can be saved in hdf5 or numpy format
Project description
datastorage
--------
To use simply do::
>>> from datastorage import DataStorage
>>> data = DataStorage( a=(1,2,3),b="add",filename='store.npz' )
>>> # data.a will be a dictionary
>>> data = DataStorage( myinfo = dict( name= 'marco', surname= 'cammarata'),\
>>> data = np.arange(100) )
>>> # reads from file if it exists
>>> data = DataStorage( 'mysaveddata.npz' ) ;
>>> create empty storage (with default filename)
>>> data = DataStorage()
>>> data.mynewdata = np.ones(10)
--------
To use simply do::
>>> from datastorage import DataStorage
>>> data = DataStorage( a=(1,2,3),b="add",filename='store.npz' )
>>> # data.a will be a dictionary
>>> data = DataStorage( myinfo = dict( name= 'marco', surname= 'cammarata'),\
>>> data = np.arange(100) )
>>> # reads from file if it exists
>>> data = DataStorage( 'mysaveddata.npz' ) ;
>>> create empty storage (with default filename)
>>> data = DataStorage()
>>> data.mynewdata = np.ones(10)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
datastorage-0.3.7.tar.gz
(6.9 kB
view hashes)
Built Distributions
Close
Hashes for datastorage-0.3.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bef05de4822e795062b313e3c31fb653dffaec22e2c683a2fd916e54101ea53 |
|
MD5 | 90f5f4899702bca01bdd8b22b3f54e26 |
|
BLAKE2b-256 | 7bfbf14eb25370d7944bd0478fb507578d0114d74cf8a9e3b761c3ddf737a5b7 |
Close
Hashes for datastorage-0.3.7-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 996a169c650ac963ba41cc0d3402582abc6f352a8b9ca77206aad313e3c89e93 |
|
MD5 | c3945fb10e504b64d7b8f72d52549782 |
|
BLAKE2b-256 | 6459da97a741b8d5f4c98faf41a7038efb00a5ce6ad2d76f49394758aa9f7d39 |