Skip to main content

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.create(Dog) # expects Python collections.namedtuple
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, use something else than sqlite memory
dog = memory.get.dog()
assert dog.color == 'brown'

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

membank-0.2.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

membank-0.2.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file membank-0.2.3.tar.gz.

File metadata

  • Download URL: membank-0.2.3.tar.gz
  • Upload date:
  • Size: 5.3 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

Hashes for membank-0.2.3.tar.gz
Algorithm Hash digest
SHA256 8c60412808de4f850f99db453ee8135f9b3a1c515d538ab57acd8613a9d73ba8
MD5 0c3bdc16814b0a4608f9e5b99dd314ab
BLAKE2b-256 c8924ced351e508dd7648b1dd483b460450bd7e7b635b256877c1430c7c23ee9

See more details on using hashes here.

File details

Details for the file membank-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: membank-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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

Hashes for membank-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7f7718c15a1c75458a5dedec4d815ee99a771ac8a7906ac25a74b7f76fe8d477
MD5 e211d21f72a04ee5e7ffe92300278b12
BLAKE2b-256 45f5a019f6d58046eff9d3aaff9d2159c6fa3fda9a96c76ea76faf303abc715d

See more details on using hashes here.

Supported by

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