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.1.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for datastorage-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6055c1b3ebeb42fe757a6c26fe3562139b1f5814cd29ec65d64b14a2fbc1454d |
|
MD5 | 73065fc7a21dca6535d665aabe30b8e1 |
|
BLAKE2b-256 | 971476123ce6b27625d0e223a26815dc4e0952142864011afa57f5341cf8c91d |