Skip to main content

Rapid Redis

Rapid Redis is a lightweight, educational in-memory cache library inspired by Redis. It is built entirely in Python for learning purposes and designed to be simple, minimal, and easy to extend.


Overview

Rapid Redis provides a basic Redis-like interface for storing and managing cached data using Python dictionaries under the hood. It currently supports five common data structures and exposes simple, intuitive methods for cache operations.


Features

  • In-memory key-value cache using Python dictionaries

  • Basic operations: set, get, delete, exists, and flush

  • Supports multiple data structures:

    • Strings
    • Lists
    • Sets
    • Hashes
    • Sorted Sets
  • Easy to use and lightweight — ideal for understanding Redis fundamentals


Installation

You can install Rapid Redis locally using:

pip install -e .

(Ensure you run this from the project root directory where setup.py is located.)


Usage

from rapid_redis import RapidCache
from rapid_redis.datastructures import strings, lists, sets, hashes, sortedsets

cache = RapidCache()

# String operations
cache.set("name", "Atharsh")
print(cache.get("name"))  # Output: Atharsh

# List operations
lists.lpush(cache, "mylist", 1, 2, 3)
print(cache.get("mylist"))  # Output: [3, 2, 1]

# Set operations
sets.sadd(cache, "myset", "a", "b", "c")
print(sets.smembers(cache, "myset"))  # Output: {'a', 'b', 'c'}

# Hash operations
hashes.hset(cache, "user:1", "name", "Atharsh")
print(hashes.hget(cache, "user:1", "name"))  # Output: Atharsh

# Sorted set operations
sortedsets.zadd(cache, "scores", 10, "Alice")
sortedsets.zadd(cache, "scores", 5, "Bob")
print(sortedsets.zrange(cache, "scores", 0, -1))  # Output: ['Bob', 'Alice']

Roadmap

Planned features for upcoming releases include:

  • TTL (Time-to-Live) support for expiring keys
  • Persistent cache storage (saving data to disk)
  • Thread-safe operations
  • Command-line interface for quick cache access
  • Optional lightweight server mode for experimentation
  • Concurrency for multiple user handling

Contributing

Rapid Redis is an open project — contributions are welcome. If you’d like to improve functionality, add features, or clean up code, feel free to fork the repository and open a pull request.


License

This project is released under the MIT License.

Metadata

Release files for rapid-redis 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rapid-redis 0.1.1
File Size Uploaded
rapid_redis-0.1.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rapid-redis 0.1.1
File Interpreter ABI Platform
rapid_redis-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / rapid_redis-0.1.1.tar.gz

Download URL rapid_redis-0.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3ce74555d1bf1daed2fb0ccd18c1b85b66d65028861bf376fb6a57767b2f0209
BLAKE2b-256 checksum
How to use checksums
a999d58085680455b30c7c72082ca8ea7eea8bcca660ba50ecf94e1bf5122257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / rapid_redis-0.1.1-py3-none-any.whl

Download URL rapid_redis-0.1.1-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
337aaf990678be4fb6b68130d13b7c4519b977059456987e2ead66cb60318558
BLAKE2b-256 checksum
How to use checksums
72ad6e8527d2d9a82ce12c8a4ac05e8de135ad7351f0212409174b81d55e1f1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page