A Python package for memory-related utilities
Project description
Mnemosyne
This is a dummy package to reserve the name while waiting for the scientific publication.
Dummy package
A Python package for memory-related utilities.
Installation
pip install mnemosyne
Usage
As a Python Library
from mnemosyne.core import Memory
# Create a memory store
memory = Memory()
# Store values
memory.remember("key", "value")
memory.remember("user", {"name": "John", "age": 30})
# Retrieve values
value = memory.recall("key") # Returns "value"
user = memory.recall("user") # Returns {"name": "John", "age": 30}
missing = memory.recall("missing", "default") # Returns "default"
# Remove values
memory.forget("key") # Returns True if key existed, False otherwise
# Clear all values
memory.clear()
As a Command-Line Tool
Mnemosyne provides a command-line interface for basic operations:
# Store a value
mnemosyne remember name "John Doe" --file memory.json
# Store a JSON value
mnemosyne remember user '{"name": "John", "age": 30}' --file memory.json
# Retrieve a value
mnemosyne recall name --file memory.json
# Retrieve with a default value if not found
mnemosyne recall email --default "not set" --file memory.json
# Remove a value
mnemosyne forget name --file memory.json
Development
Setup
# Clone the repository
git clone https://github.com/username/mnemosyne.git
cd mnemosyne
# Create and activate a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install for development
pip install -e .
Running Tests
python -m unittest discover
Building the Package
To build the package for distribution:
pip install build
python -m build
This will create distribution files in the dist/ directory.
See PUBLISHING.md for more details on publishing to PyPI.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Laurent-Philippe Albou
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mnemosyne-0.1.0.tar.gz.
File metadata
- Download URL: mnemosyne-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe8520d6e8d22e4cf37d0c71c036aa6fce8451c0ce263b2329c47a59f2e7f3e0
|
|
| MD5 |
26fa7ed75d5ba5fbc1ef3956bfe242d1
|
|
| BLAKE2b-256 |
3a96b0a7bf93c0fe093fb6d851e43447924feb54d86447c4b88136d8f0af1db0
|
File details
Details for the file mnemosyne-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mnemosyne-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d65bfc2671f39c51cd6e257c76aa3d1f2a61abb7041de2867eb219ee0cc3a2c7
|
|
| MD5 |
81a05ab04d16a4e4e8e97b613b1e88c7
|
|
| BLAKE2b-256 |
f6689d9226d480f634d6cdc17dd59a135f2887e8bf5e758fd6226893586edf41
|