PersistentMemory Library Documentation
Overview
PersistentMemory is a Python library for managing persistent data with optional encryption. It provides a simple interface for storing and retrieving data, with an added benefit of in-memory caching for improved read performance.
Installation
You can install the library using pip:
pip install PersistentMemory
Usage
Initialization
To use PersistentMemory, first import it and create an instance:
from persistentMemory.PersistentMemory import PersistentDictionary
pd = PersistentDictionary(appName='YourAppName', encryptionKey='YourEncryptionKey')
Storing Data
You can store data using the store_data method:
pd.your_key = your_data
pd.push('your_key', your_data)
Retrieving Data
Retrieve data using the retrieve_data method. This method will first check the in-memory cache before accessing the disk:
data = pd.your_key
data = pd.get('your_key')
Caching
Data read from disk is cached in memory, which speeds up subsequent read operations for the same data.
Features
- Data persistence on the filesystem.
- Data encryption.
Release files for PersistentMemory 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| PersistentMemory-0.1.4.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PersistentMemory-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / PersistentMemory-0.1.4.tar.gz
| Download URL | PersistentMemory-0.1.4.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73d4ba6025462c87f63f316a527200cc587ad62dece79a7818201ef6ed03701a
|
|
BLAKE2b-256 checksum How to use checksums |
149320c01c4c6270bc3dcfcd0954c4b7057c999b8eceb78f990d8bb28333e359
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / PersistentMemory-0.1.4-py3-none-any.whl
| Download URL | PersistentMemory-0.1.4-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
682a9e6415c9793077d7a9fafa2afb7183c74d0f1f28c4305d9ddd2339be6177
|
|
BLAKE2b-256 checksum How to use checksums |
23e08a7ac8f85edd94b944c55652af9b19efd12b60974bf71f3ac4850b269202
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|