author | title |
---|---|
Mohammad Esmaeili |
Medis (PyInMemStore) |
- a simple in memory store like redis
- use redis-cli to connect
- includes data persistense using pickle
- Python 3.11 and up
- pytest
docker compose up --build
- setup virtual environment
python3.11 -m venv venv && source venv/bin/activate
- install dependencies
pip install -r requirements.txt
- run server
sudo chmod +x medis.sh
./medis.sh
- connect using redis cli
redis-cli -p 6689
- SET (ex: set test_key test_value {ttl in milliseconds like 10000})
- GET (ex: get test_key)
- DEL (ex: del test_key)
- TTL (ex: ttl test_key)
- PING
- COMMAND (just greetings)
we are using pytest as testing library so easily run pytest to run tests
pytest
Mention how anyone can contribute to make this project more productive or fix bugs in it.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.
Steps to contribute:
- Fork this repository (link to your repository)
- Create your feature branch (git checkout -b feature/fooBar)
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
- Create a new Pull Request
- Command Pattern for redis commands
- Thread safe Singleton Pattern for db store
- mono (single) observer for db persistors