Installation
Requirements
- Python 3.8+
- Redis server (local or remote)
- Docker (optional, for development)
Install from PyPI
The easiest way to install redis-memory is from PyPI:
Install from Source
If you want to install from source:
Redis Setup
redis-memory requires a Redis server to be running. You can:
Option 1: Use Docker
Option 2: Install Redis Locally
macOS:
Ubuntu/Debian:
Windows: Download and install from Redis for Windows
Environment Variables
Configure redis-memory using environment variables:
REDIS_HOST: Redis server hostname (default:redis)REDIS_PORT: Redis server port (default:6379)REDIS_PREFIX: Key prefix for namespacing (default:memory:)
Example .env file:
Verify Installation
Test that everything is working:
from redis_memory import Memory
mem = Memory()
mem.test = "Hello, Redis!"
print(mem.test) # Should print: Hello, Redis!
If you see the output, you're all set! 🎉