My simple Redis data structure store powered by myasync. RESP2 compatible. Supports redis-cli
.
Implemented:
- Replicas
- Append-only snapshots
- Ping
- Echo
- Get
- Set (with expire)
- Get config values
- Create venv
python -m venv .venv
- Activate venv
. .venv/bin/activate
- Install
myredis
pip install myredis@git+https://github.com/KrySeyt/myredis.git
- Run
myredis
server
python -m myredis
--port <port:int>
- Optional. Server port. Default -6379
--dir <dirname:str>
- Optional. DB files dir.--dbfilename <filename:str>
- Optional. DB filename.--snapshotsinterval <seconds:int>
- Optional. Interval between snapshot updates. Default - 300 secs (5 mins)--replicaof <master-domain:str> <master-port:int>
- Optional. Start server as replica of master
python -m myredis --port 6379 --dir mydir --dbfilename dbfile
redis-cli get foo
redis-cli set foo bar
redis-cli set foo bar px 1000
redis-cli wait 3 1000
redis-cli ping
redis-cli echo "Hello, World\!"
redis-cli wait 3 1000
redis-cli config get port
- String
- Integer (server responses only)
- Null (server responses only)
-
Complete Setup
-
Run tests
pytest