Skip to main content

PyPI Travis build License Last commit Status

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.

Installation

pip install res-manager

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.

>>> 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 data id, name, topic.

  • 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

Authors

Requirements

  • prettytable>=0.7.2

Note

ResultManager is developed by Python 3.5 and tested on python 2.6, 2.7, 3.4-3.7

Key release notes

  • 1.0.3 Save data to pickle files, initial version.

  • 2.0.0 Introduce SQLite to save and manage data.

  • 2.1.0 Securely closing SQLite connections under any circumstances.

  • 2.2.0 Add support to quotation marks, add update_meta interface, simplifier some interfaces.

  • 3.0.0 Add version control to manage data at different versions with the same name.

Release files for res-manager 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for res-manager 3.1.1
File Size Uploaded
res_manager-3.1.1.tar.gz 18.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for res-manager 3.1.1
File Interpreter ABI Platform
res_manager-3.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 24.9 kB

Release files / res_manager-3.1.1.tar.gz

Download URL res_manager-3.1.1.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
410185122ac5ecbc4b2234da9d3d8be1876f5a9cc2c2d2ceb64914d75828943e
BLAKE2b-256 checksum
How to use checksums
ec6f11bdaf74dc9f9fd8232aa46f1f1d91997a789a817e6ab6d5dc148a3bd8c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6

Release files / res_manager-3.1.1-py2.py3-none-any.whl

Download URL res_manager-3.1.1-py2.py3-none-any.whl
Size 6.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5ceacdb938c74cd12213912f7c7dc8f26752ec0b2ff27597a6660f05ed5cde46
BLAKE2b-256 checksum
How to use checksums
5eb48aa5cb1e71296bff0797f55e7507d86d497323dce8ded1afeee9f11f160d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6

Release history Release notifications | RSS feed

This release

3.1.1 This release

2 release files

3.1.0

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.1

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page