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.4.2.tar.gz
(8.3 kB
view hashes)
Built Distributions
Close
Hashes for datastorage-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32259bb8668f3e1497557f60b91ceee12f10243f17e87a067a5863364d43d256 |
|
MD5 | c2914698f88b7f35148ff10354c8150c |
|
BLAKE2b-256 | ddbb96427567884e4667dea33466eb4f86aff042849ab79391db12f5e0df49a7 |
Close
Hashes for datastorage-0.4.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6918b094d07484f6fbc79de703a3c313ec9add89c573c9050d0a59926b3f178c |
|
MD5 | dac8fe761dd093bdafe2c772e076b9f1 |
|
BLAKE2b-256 | b734eb179462cf0df433174627f7e4af63866145683607ce0625f3177c2f87a1 |