This project implements Redis-like functionality with basic server and client interactions.
- Python 3.x installed
- pip package manager
pip install -r requirements.txtpython server.pyThe server will start on default port 63632 (standard Redis port).
redis-cli -p 63632This will connect to the Redis server on the default port 6379.
Currently implemented commands:
set key value- Store a key-value pairget key- Retrieve value by keydel key- Delete a key-value pairgetset key value- Set new value and return old valuemset key1 value1 key2 value2...- Set multiple key-value pairsmget key1 key2...- Get multiple valuesincr key- Increment valueincrby key value- Increment by specific valuedecr key- Decrement valuedecrby key value- Decrement by specific valueping- Test server connection (returns PONG)
Example usage:
set user1 "John Doe"
get user1
del user1
exists user1
pingFuture implementations will include:
- Data persistence
- TTL (Time To Live) for keys
- List operations (lpush, rpush, lrange)
- Hash operations (hset, hget)
- Set operations (sadd, smembers)
- Connection pooling
- Authentication
Feel free to contribute by submitting pull requests or creating issues for bugs and feature requests.
MIT License