Package for persistent memory
Project description
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 PersistentMemory
pm = PersistentMemory(appName='YourAppName', encryptionKey='YourEncryptionKey')
Storing Data
You can store data using the store_data
method:
pm.your_key = your_data
pm.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 = pm.your_key
data = pm.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.
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
Hashes for PersistentMemory-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08aaffbd2fc6f575872bdd7f5ba387362f4515ccc68e9b1926ba4c3c4bd6bcd0 |
|
MD5 | 387ffb844bb3b2488b14ace6cc3a56c8 |
|
BLAKE2b-256 | 2302b7bdf5318fca99ec1a446213e84ae173505a32d92cac6e744daf77011360 |