Metadata-Version: 2.4
Name: redis-simplify
Version: 0.1.1
Summary: Wrapper de conveniência para Redis - conexão, JSON helpers e reconexão automática
Author-email: Paulo Ricardo Tebet Lyrio <tebetpaulo91@yahoo.com>
License: MIT
Project-URL: Homepage, https://github.com/Paulouuul/redis-simplify
Project-URL: Repository, https://github.com/Paulouuul/redis-simplify
Project-URL: Issues, https://github.com/Paulouuul/redis-simplify/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: redis>=4.0.0
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"

## Configuration

All configuration is explicit via constructor parameters:

```python
from redis_simplify import RedisClient

client = RedisClient(
    host="localhost",   # Required
    port=6379,          # Default: 6379
    password=None,      # Optional
    db=0                # Default: 0
)
```

The package does not automatically read `.env` files.

Configuration is intentionally explicit to keep behavior predictable and framework-agnostic.

---

## Automatic Reconnection Example

```python
from redis_simplify import RedisClient

# Redis is running
client = RedisClient(host="localhost")

client.set("key", "value")  # ✅ Works

# Redis goes down
# ... server restart, network interruption, etc.

# When Redis becomes available again,
# the next operation automatically attempts reconnection.

value = client.get("key")

print(value)
```

No manual reconnection logic is required.

---

## Differences from redis-py

| Feature             | redis-py            | redis-simplify                     |
| ------------------- | ------------------- | ---------------------------------- |
| Exception handling  | Raises exceptions   | Logs and returns fallback values   |
| Reconnection        | Manual handling     | Automatic                          |
| JSON helpers        | No built-in helpers | `set_json()` / `get_json()`        |
| Configuration       | Highly flexible     | Explicit constructor configuration |
| Convenience wrapper | No                  | Yes                                |
| Safe defaults       | No                  | Yes                                |

---

## Documentation

Useful resources:

* Redis Commands: https://redis.io/commands
* redis-py Documentation: https://redis-py.readthedocs.io/
* redis-simplify GitHub: https://github.com/Paulouuul/redis-simplify
