Skip to main content

Dict-like object that can be saved in hdf5 or numpy format

Project description

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

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.10.linux-x86_64.tar.gz (19.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page