A custom result backend for Celery using ValKey as the storage engine. This backend provides a scalable, high-performance alternative to traditional result backends by leveraging ValKey's distributed key-value store capabilities.
- Python >= 3.8
- Celery >= 4.4.0
- ValKey >= 6.0.0
Install the package using pip:
pip install celery-valkey-backend
Use the ValKey backend in your Celery application:
from celery import Celery
app = Celery('your_app', backend='valkey://localhost:6379/0')
@app.task
def add(x, y):
return x + y
# Using the task
result = add.delay(4, 4)
print(result.get()) # Output: 8
The backend URL format:
valkey://host:port/db
Example:
valkey://localhost:6379/0
# Clone the repository
git clone https://github.com/vuonglv1612/celery-valkey-backend.git
cd celery-valkey-backend
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
This project is licensed under the MIT License.
If you encounter any problems or have questions, please open an issue on GitHub Issues.