Metadata-Version: 2.4
Name: redisify
Version: 0.1.0
Summary: Redisify is a lightweight Python library that provides Redis-backed data structures like dicts, queues, locks, and semaphores, designed for distributed systems.
Author-email: Lei Zhang <jameszhang2880@gmail.com>
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: redis
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.20.0; extra == "test"
Dynamic: license-file

# 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

```bash
pip install redisify
```

Or for development and testing:

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

## Usage Example

```python
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:

```bash
pytest -v tests
```

## License

This project is licensed under the MIT License.
