Metadata-Version: 2.1
Name: membank
Version: 0.2.4
Summary: A library to handle persistent memory
Home-page: https://github.com/Kolumbs/membank
Author: Juris Kaminskis
Author-email: juris.kaminskis@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/Kolumbs/membank/issues
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Database
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: alembic
Requires-Dist: sqlalchemy

# 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
```python
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
```python
memory = LoadMemory() # to make this work in new process, don't use sqlite memory
dog = memory.get.dog()
assert dog.color == 'brown'
```


