Skip to main content

Minimalist storage class for any purpose.

Project description

1. Storer - Minimalist storage class for any purpose.

The main idea of the Storer is to provided only few methods for powerful manupulating and keeping the data in the files. Particularly methods put and get are enough for quick start.

1.1. Quick start

Installation:

pip3 install Storer

  1. Create an Storer instance: s = Storer()
  2. Put something: s.put(what=<what_ever_you_like>, name=<name_of_object>)
  3. Get something: s.get(name=<name_of_object>)
  4. Look at internal data of the instance: s.show() or output = s.show(get_string=True)

1.2. Few examples

>>> from storer import Storer
>>> s = Storer()
>>> s.put(what="string", name="my_string")
>>> s.get(name="my_string")
'string'
>>> 
>>> from storer import Storer
>>> s = Storer(dump_path="~/my_folder_for_dumps", dump_name="dumps", verbose=True)
[Storer v.1.0.6 [55]] is initialized!
Dump folder: [~/my_folder_for_dumps]
[Storer] No data is available for loading...
>>> s.put(what=[i for i in range(10)], name="my_range")
>>> s.put(what={v:v*2 for v in range(5)}, name="my_dict")
>>> s.dump()
[Storer] ~/my_folder_for_dumps dumps dumping...  # at this point you have you data stored (force)
>>> 

However you can use just put methods and the Store will dump your data automatically:

>>> from storer import Storer
>>> s = Storer(dump_path="~/my_folder_for_dumps", dump_name="dumps", verbose=True)
[Storer v.1.0.6 [55]] is initialized!
Dump folder: [~/my_folder_for_dumps]
[Storer] No data is available for loading...
>>> s.put(what=[i for i in range(10)], name="my_range")
>>> s.put(what={v:v*2 for v in range(5)}, name="my_dict")
>>> exit()
[Storer] ~/my_folder_for_dumps dumps dumping...

1.3. Contribution

Feel free to contribute to the project, but please create initially an issue with detailed problem and way to resolve it.

License


MIT

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

storer-1.0.8.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storer-1.0.8-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file storer-1.0.8.tar.gz.

File metadata

  • Download URL: storer-1.0.8.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for storer-1.0.8.tar.gz
Algorithm Hash digest
SHA256 53a303a9fcdb631484a9846d13d78f2c2921a3faf396aa6add468732beecb8c5
MD5 11cbb2af8706dcbc1242d0793037b58c
BLAKE2b-256 18e63d86efc5aa53be7ec5a4336f33d4bb09635c5c6f4c9303cb5c832e2d8a06

See more details on using hashes here.

File details

Details for the file storer-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: storer-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for storer-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 edd79ba96056672490dda72e97945c8e1b4952a9c78b6df08b8e964a1545cd1c
MD5 c42ddc61a18bc9d55bb98c526c58569e
BLAKE2b-256 f995237aeaa22fc3bcade3d0cfd9325f5fa4d0dd2a98aa4977cdf19c3c9e4dce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page