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.1.tar.gz
(8.1 kB
view hashes)
Built Distributions
Close
Hashes for datastorage-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb46d6a71e67c684e4247e1bce46284e09e67f22751f8d86ce454540ecc95ead |
|
MD5 | a2aacf7f58e9edaccdbde3dc0429710b |
|
BLAKE2b-256 | ae03fe20d4149d37f36bbcfa8fe2c9eb766d1bc4308cb342c06ed9c08875d6f4 |
Close
Hashes for datastorage-0.4.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3e9dc2f5006a4d5cd56ec5ac2210af18d4de695b02e7dec76efe18a2d182612 |
|
MD5 | 4298d136688803cdd2e86529a56dbf50 |
|
BLAKE2b-256 | e4bc1287c739bc6e1378ad7298b049bca60ae272fedea06cbc4a1bd56a0619a6 |