PyRedis is a lightweight, persistent key-value store written in Python, designed to simulate Redis-like functionality for learning, local development, or prototyping purposes. It includes a command-line interface, a web GUI powered by Flask, TTL support, disk persistence, and Dockerization for smooth deployment.
- Fast in-memory key-value operations
- TTL (time-to-live) support for expiring keys
- Data persistence using JSON file storage
- Unit tests for reliability and correctness
- Web-based GUI built with Flask
- Docker support for isolated deployment
- Python 3.10
- Flask - Web GUI
- Docker - Containerization
- HTML/CSS - Simple UI frontend
- argparse - CLI commands
- requests - HTTP handling (optional future enhancements)
# Clone the repo
cd pyredis
pip install -r requirements.txt
python gui/web_gui.pyThen visit: http://localhost:9567
# Build the image
docker build -t pyredis-webgui .
# Run the container (on port 9567)
docker run --rm -p 9567:9567 pyredis-webguiVisit: http://localhost:9567
python -m unittest tests/test_kv_store.py├── core/
│ └── kv_store.py # KeyValueStore logic
├── gui/
│ ├── web_gui.py # Flask web server
│ └── templates/
│ └── index.html # Frontend HTML interface
├── tests/
│ └── test_kv_store.py # Unit tests
├── Dockerfile # Container configuration
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Add user authentication to the web GUI
- Add support for namespaces or multiple logical databases
- Add GUI styling with Bootstrap or Tailwind CSS
- Deploy on Render/Fly.io/Heroku
Feel free to fork, star, and contribute!