Metadata-Version: 2.4
Name: valkeyrie
Version: 1.0.1
Summary: A lightweight Redis-compatible Python client for Valkeyrie distributed cache
Home-page: https://github.com/Valkeyriee/Valkeyrie
Author: Valkeyrie Team
Author-email: Valkeyrie Team <indiser01@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/Valkeyriee/Valkeyrie
Project-URL: Documentation, https://github.com/Valkeyriee/Valkeyrie
Project-URL: Repository, https://github.com/Valkeyriee/Valkeyrie
Project-URL: Bug Tracker, https://github.com/Valkeyriee/Valkeyrie/issues
Keywords: cache,redis,valkeyrie,database,distributed,key-value,nosql
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
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
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Database
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Valkeyrie Python Client

A lightweight, Redis-compatible Python client for Valkeyrie distributed cache system.

## Installation

```bash
pip install valkeyrie
```

## Quick Start

```python
from valkeyrie import ValkeyreClient

# Connect to Valkeyrie server
with ValkeyreClient('localhost', 6379) as client:
    # SET and GET
    client.set('user:1001', 'Alice')
    value = client.get('user:1001')
    print(value)  # 'Alice'
    
    # Check existence
    if client.exists('user:1001'):
        print("Key exists!")
    
    # Set expiration (TTL)
    client.expire('user:1001', 300)  # 5 minutes
    
    # Delete key
    client.delete('user:1001')
```

## Features

- ✅ Full RESP protocol support
- ✅ Context manager for automatic connection handling
- ✅ Simple, intuitive API
- ✅ Compatible with Redis commands
- ✅ No external dependencies
- ✅ Python 3.7+

## API Reference

### Connection

```python
client = ValkeyreClient(host='127.0.0.1', port=6379)
client.connect()
client.disconnect()
```

### Commands

| Method | Description |
|--------|-------------|
| `set(key, value)` | Set key to value |
| `get(key)` | Get value by key |
| `delete(key)` | Delete key |
| `exists(key)` | Check if key exists |
| `expire(key, seconds)` | Set expiration time |
| `keys()` | Get all keys |
| `info()` | Get cache statistics |
| `ping()` | Test connection |

## Example

```python
from valkeyrie import ValkeyreClient

client = ValkeyreClient('localhost', 6379)
client.connect()

# Store user session
client.set('session:abc123', 'user_data')
client.expire('session:abc123', 3600)

# Retrieve session
session = client.get('session:abc123')

# Get all keys
all_keys = client.keys()

# Get cache stats
stats = client.info()
print(stats)

client.disconnect()
```

## Requirements

- Python 3.7+
- Running Valkeyrie server

## License

MIT License

## Links

- GitHub: https://github.com/Valkeyriee/Valkeyrie
- Documentation: https://github.com/Valkeyriee/Valkeyrie/blob/main/README.md
