Skip to main content

zerodb-celery

Celery broker + result backend powered by ZeroDB. Replace Redis/RabbitMQ with one line.

PyPI License: MIT

Why?

Celery requires Redis or RabbitMQ for its broker and result backend. That means provisioning, configuring, and paying for infrastructure you shouldn't need.

zerodb-celery replaces both with ZeroDB — a cloud database that auto-provisions on first use. No signup, no credit card, no infrastructure.

Install

pip install zerodb-celery

Quick Start

from celery import Celery
from zerodb_celery import ZeroDBBroker, ZeroDBBackend

app = Celery('tasks')

# Configure both broker and backend
ZeroDBBroker.configure(app)
ZeroDBBackend.configure(app)

@app.task
def add(x, y):
    return x + y

# Trigger a task
result = add.delay(4, 6)
print(result.get(timeout=30))  # 10

Configuration

Auto-provisioning (default)

Just use zerodb://auto — a free ZeroDB project is created on first use:

app.config_from_object({
    'broker_url': 'zerodb://auto',
    'broker_transport': 'zerodb_celery.broker:Transport',
    'result_backend': 'zerodb_celery.backend:ZeroDBBackend',
})

Explicit credentials

Set environment variables:

export ZERODB_API_KEY=zdb_your_key_here
export ZERODB_PROJECT_ID=proj_your_id_here

Or pass them directly:

ZeroDBBroker.configure(app, api_key='zdb_...', project_id='proj_...')
ZeroDBBackend.configure(app, api_key='zdb_...', project_id='proj_...')

Credential resolution order

  1. Explicit api_key / project_id parameters
  2. ZERODB_API_KEY / ZERODB_PROJECT_ID environment variables
  3. Cached credentials in ~/.zerodb/credentials.json
  4. Auto-provision a new free project via API

How It Works

Broker (message queue)

The broker uses ZeroDB's event stream as a message queue:

  • Publish task: POST /api/v1/zerodb/events with topic celery:{queue_name}
  • Consume task: GET /api/v1/zerodb/events?topic=celery:{queue_name}&consume=true

Result backend (task results)

The backend stores results in a ZeroDB table called celery_results:

  • Store result: POST /api/v1/zerodb/tables/celery_results/rows
  • Get result: GET /api/v1/zerodb/tables/celery_results/rows/{task_id}

The table is auto-created on first use.

Use Cases

  • ML pipelines: Queue training jobs, store results — no Redis needed
  • AI agent workflows: Background task processing for agent swarms
  • Serverless apps: No infrastructure to manage alongside your Celery workers
  • Prototyping: Get Celery running in 30 seconds without Docker

Comparison

Feature Redis RabbitMQ zerodb-celery
Setup time 5-30 min 10-60 min 0 min (auto)
Infrastructure Self-hosted or managed Self-hosted or managed None
Cost $15-100+/mo $15-100+/mo Free tier
Persistence Optional (AOF/RDB) Yes Yes
Auto-provisioning No No Yes

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

License

MIT

Metadata

Release files for zerodb-celery 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zerodb-celery 0.1.0
File Size Uploaded Provenance
zerodb_celery-0.1.0.tar.gz 12.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zerodb-celery 0.1.0
File Interpreter ABI Platform
zerodb_celery-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / zerodb_celery-0.1.0.tar.gz

Download URL zerodb_celery-0.1.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f1936cfa9cd841f7ca5e4326850ee728ab285df6e8f3ccceea751649297cbf5d
BLAKE2b-256 checksum
How to use checksums
b9c77c7fe11b2ae17688c85b33e0bb01f4241f94615ea77eb892db61130c9cf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / zerodb_celery-0.1.0-py3-none-any.whl

Download URL zerodb_celery-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b906ad91077f462b6292c98c564156a86574348f29802a87bc87206d9c9b63f
BLAKE2b-256 checksum
How to use checksums
9da9e3699c43ab4e18965d747a5937fb2f3d00b254eeb499bcbf80e9fc406427
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for zerodb-celery 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page