Skip to content

Raghuram52/redis-mini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

redis-mini (Python, asyncio)

Minimal Redis-like key–value store with O(1) lookups, TTL, and append-only persistence (AOF). Concurrent TCP server using asyncio.

Features

  • Commands: SET/GET/DEL/EXISTS/EXPIRE/TTL/INCR/KEYS/INFO/SAVE/FLUSHALL/SHUTDOWN
  • TTL expiration + background reaper
  • AOF persistence with crash recovery
  • Simple line protocol; test with nc

Quick start

python redis_mini/server.py --host 127.0.0.1 --port 6380 --data_dir ./data
printf "PING\nSET foo bar\nGET foo\nEXPIRE foo 5\nTTL foo\n" | nc 127.0.0.1 6380

Notes

  • Python 3.9+ (tested on 3.13)
  • Fsync policy: --aof_fsync = always | everysec | no
  • SAVE writes data/dump.json

About

Minimal Redis-like key-value store in Python (asyncio) with TTL and AOF persistence.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages