A library to handle persistent memory
Project description
membank
Python library for storing data in persistent memory (sqlite, postgresql, berkeley db)
goals
Provide interface to database storage that automates heavy lifting of database setup, migration, table definition, query construction.
quick intro
add items to persistent storage
from membank import LoadMemory
from collections import namedtuple
memory = LoadMemory() # defaults to sqlite memory
Dog = namedtuple('Dog', ['color', 'size', 'breed'])
memory.put.dog(Dog('brown')) # stores object into database
dog = memory.get.dog() # retrieves first object found as namedtuple
assert dog.color == 'brown'
retrieve those after
memory = LoadMemory() # to make this work in new process, don't use sqlite memory
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
membank-0.2.4.tar.gz
(5.5 kB
view details)
Built Distribution
File details
Details for the file membank-0.2.4.tar.gz
.
File metadata
- Download URL: membank-0.2.4.tar.gz
- Upload date:
- Size: 5.5 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 | 689a04e06e78cc89579d6e9836fb32a1cdeb11ade79e7415a716f3c79c7c8490 |
|
MD5 | 1cd6dffede41db3c94d595846479b8bc |
|
BLAKE2b-256 | 2791bb3a50e4e625b3596df799f84dccb3275f77064d0660b118a9ef0429ffda |
File details
Details for the file membank-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: membank-0.2.4-py3-none-any.whl
- Upload date:
- Size: 5.7 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 | 803fb9b8cafe7a792ec9a7a54af87fad9e17def89c8f96c2fdf5afef8e48b56e |
|
MD5 | 28d9190d2800039380298c226d20ed7c |
|
BLAKE2b-256 | 4d8572ebfa3a01cd5d1caa062fc391a84befc6355c9e664486c8ed1069adadab |