res-manager helps you to manage your experimental results data in a more convenient way.
Project description
This project helps you to handle your experimental results efficiently when doing your research. Basically it uses pickle and sqlite3 to save, load and manage the data, now we provide you with some high-level interfaces so that you can get rid of pickle dumping and loading from disk all the time.
Since it is based on pickle, in theory you can use it to manage all types of data in python, you can even save an object as shown in the following examples.
Usage
Just start with from res_manager import ResultManager, now you can create an object with rm = ResultManager(path) and then use it to save, load, delete and preview your data.
Install ResultManager with pip install res-manager
>>> from res_manager import ResultManager >>> rm = ResultManager('data') >>> rm.save([1, 2, 3], topic='test saving', name='data1', comment='Test saving a list') >>> rm.save(65535, topic='test saving', comment='Test saving a number without a name') >>> rm.save(rm, topic='topic 2', name="object of \"ResultManager\"", comment='Saving an object') >>> rm.save({0:1,1:'string'}, name="hongshan's dict without topic") >>> rm.print_meta_info() ... >>> rm.load(3) <res_manager.manager.ResultManager object at 0x7f29c8587470> >>> rm.load(3, version='first') [1, 2, 3] >>> rm.delete_by_id(3, version='latest') >>> rm.update_meta(1, name='b', topic='topic 5')
ResultManager
This project mainly provides:
A class named ResultManager that provides all functions.
ResultManager.save: Save your data.
ResultManager.load: Loading data by ID.
ResultManager.print_meta_info: Print all meta info of saved data, including name, path, topic, comments etc.
ResultManager.delete_by_id: Delete data from yor storage.
ResultManager.update_meta: Update meta information.
ResultManager.print_names and ResultManager.print_comments: Print names and comments.
ResultManager.print_data_info: Print details of the requested data.
Future Plan
Adding support to save and load figures for each piece of data
Add more interfaces
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
Built Distribution
Hashes for res_manager-3.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed9a508d7dcfdaff73b4f89262920bb15d435a6ba05967a68d1574d25587d985 |
|
MD5 | 4c177e6e254a47050321464eea89b168 |
|
BLAKE2b-256 | 04a08c5263690e75c12ddae5882e8022f34dbd0daea17a9d5126b8517f9ff1af |