A library to handle persistent memory
Project description
membank
Python library for storing data in persistent memory (sqlite, postgresql, berkeley db)
usage
from membank import LoadMemory from collections import namedtuple
memory = LoadMemory() # defaults to sqlite memory Dog = namedtuple('Dog', ['color', 'size', 'breed']) memory.create(Dog) # expects Python collections.namedtuple memory.put.dog(Dog('brown')) # stores object into database memory.get.dog() # retrieves first object found as namedtuple dog = memory.get.dog() assert dog.color == 'brown'
... new process ... memory = LoadMemory() # this works unless sqlite memory is used before dog = memory.get.dog() assert dog.color == 'brown'
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
File details
Details for the file membank-0.2.2.tar.gz
.
File metadata
- Download URL: membank-0.2.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 854f1e850c660337152236a8c914ac587822535b30b94dcc7474549d9ced8a8b |
|
MD5 | 4abfe5951dea28686a4f8b8324eb0e0c |
|
BLAKE2b-256 | 4bafd6b8e4d39bb32e0e24e12d9d544cec671d550cedecd2b91f66e022a8ac89 |
File details
Details for the file membank-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: membank-0.2.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 563e85fc1217d8bec280f44f6425ae68a67bf765e70f2c0c225fc7d6b8d56dbe |
|
MD5 | f880169224fbe4891e936a41d153968e |
|
BLAKE2b-256 | 171e49b462653082461b82163b188bbd39fbc9c21b5ca0752b6839149d52fee1 |