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.3.tar.gz
(8.3 kB
view hashes)
Built Distributions
Close
Hashes for datastorage-0.4.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1bfddf64be411e5d76e9fbdc856d640ee4a73353c36d71c292cb19b3e1a7c22 |
|
MD5 | 4b2bea094c1bf09cfe4d28c6bd899ac6 |
|
BLAKE2b-256 | 7972f068e71f9876c45835fe1fa50cc718f3ddbdcbf68cc400feaa2779d7f44f |
Close
Hashes for datastorage-0.4.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc927c3daa2214719df9c8f00527fe1147ec24314c475d3a98c5444aa651fa76 |
|
MD5 | a7476ddc0d8359e2ff9df64279ac801e |
|
BLAKE2b-256 | d0712885f9d2462bdd039bb8e6b18aeed94b046f6a45e92c5d41d17eea2badb8 |