This is a basic implementation of Redis with some basic functionalities like -
- GET(https://redis.io/commands/get)
- SET(https://redis.io/commands/set)
- EXPIRE(https://redis.io/commands/expire)
- ZADD(https://redis.io/commands/zadd)
- ZRANK(https://redis.io/commands/zrank)
- ZRANGE(https://redis.io/commands/zrange)
To run the code in your system you must have python>3.x. Download and install here
https://github.com/may55/Redis-Implemention.git
python3 main.py
SET <key> value(string)
GET <key>
EXPIRE <key> <time-in-sec>
ZADD <set-name> <score1(float)> <element1(string)> <score2> <element2> ...
ZRANK <set-name> <element(string)>
ZRANGE <set-name> <start(int)> <end(int)>
SET key "val"
GET key
ZADD myset 1 "val" 2 "ele"
ZRANK myset "val"
ZRANGE myset 0 -1