Skip to main content

Redisify is a lightweight Python library that provides Redis-backed data structures like dicts, queues, locks, and semaphores, designed for distributed systems.

Project description

Redisify

Redisify is a lightweight Python library that provides Redis-backed data structures such as RedisDict, RedisList, and RedisQueue. It is designed for distributed systems where persistent, shared, and async-compatible data structures are needed.

Features

  • 📦 RedisDict: A dictionary-like interface backed by Redis hash.
  • 📋 RedisList: A list-like structure supporting indexing, insertion, and iteration.
  • 🔁 RedisQueue: A simple FIFO queue with blocking and async operations.
  • 🔐 (Coming soon) RedisLock, RedisSemaphore for concurrency control.

Installation

pip install redisify

Or for development and testing:

git clone https://github.com/Hambaobao/redisify.git
cd redisify
pip install -e .[test]

Usage Example

from redis.asyncio import Redis
from redisify import RedisDict, RedisList, RedisQueue

redis = Redis()

# Dict example
rdict = RedisDict(redis, "example:dict")
await rdict.__setitem__("key", "value")
print(await rdict["key"])  # Output: value

# List example
rlist = RedisList(redis, "example:list")
await rlist.append("item")
print(await rlist[0])  # Output: item

# Queue example
rqueue = RedisQueue(redis, "example:queue")
await rqueue.put("task1")
print(await rqueue.get())  # Output: task1

Requirements

  • Python 3.10+
  • Redis server (local or remote)
  • redis Python client (redis-py)

Testing

Make sure you have Redis running (locally or via Docker), then:

pytest -v tests

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redisify-0.1.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redisify-0.1.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file redisify-0.1.0.tar.gz.

File metadata

  • Download URL: redisify-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for redisify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 733d535d2c0cca0e50e7b1e8b8965148530388460f88adfea0feb47d3760590b
MD5 95f21021d3e08432b737db0b60b087d0
BLAKE2b-256 62e706cdce9cefa45a817f467252ce8b9002995709cdb8b7f538edfefa2ccda9

See more details on using hashes here.

Provenance

The following attestation bundles were made for redisify-0.1.0.tar.gz:

Publisher: publish-pypi.yml on Hambaobao/redisify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file redisify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: redisify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for redisify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 961530d71909c12b71395161aea4d34b1b6eaa79e62eac33ea7bdec03862caec
MD5 d160956a11f245fea2b4edcb2849a881
BLAKE2b-256 47ae1f03ad3a58fa0fe58076227152a334ad87d144a8aafd77348965b089d9e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for redisify-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on Hambaobao/redisify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page