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.0.tar.gz
(8.2 kB
view hashes)
Built Distributions
Close
Hashes for datastorage-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bcc2e741649c79bd67084420425a2bd1bcb0fd0c0f0ef3ea89a38ee0d0a1c8e |
|
MD5 | 60070a60b5e89c38f530bb719cf1a275 |
|
BLAKE2b-256 | 551eff3087b6036a6375946db45c171447458f13d34e8b2a32696d3f642704ef |
Close
Hashes for datastorage-0.4.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a34772633e019db425f2e0917a189054e8c13ecf29cf50d8d37af46139b45f0 |
|
MD5 | 19095fb5cd7073dc37aed7c93af1e5bb |
|
BLAKE2b-256 | 8698e4466158677cf4a05f3dadd747604ff3c88731de7c413f880140e597e33d |