Skip to main content

Durable queues, streams, pub/sub, and cron scheduler on SQLite. One file, zero servers.

Project description

honker (Python)

Python binding for Honker: durable queues, streams, pub/sub, and time-trigger scheduling on SQLite.

Full docs live in the main repo and docs site:

Install

pip install honker

You also need the Honker SQLite extension. Use a release build from the main repo, or build it yourself:

git clone https://github.com/russellromney/honker
cd honker
cargo build --release -p honker-extension

Quick start

import honker

db = honker.open("app.db")
q = db.queue("emails")

q.enqueue({"to": "alice@example.com"})

async for job in q.claim("worker-1"):
    send_email(job.payload)
    job.ack()

Delayed jobs use run_at:

import time

q.enqueue({"to": "later@example.com"}, run_at=int(time.time()) + 10)

Recurring schedules use schedule expressions:

sched = db.scheduler()
sched.add("fast", queue="emails", schedule="@every 1s", payload={"kind": "tick"})

Supported schedule forms:

  • 5-field cron: 0 3 * * *
  • 6-field cron: */2 * * * * *
  • interval: @every 1s

Notes

  • claim() wakes on database updates and on due deadlines like run_at.
  • schedule is the canonical recurring-schedule name.
  • cron still works as a compatibility alias in older call sites.

For streams, notify/listen, tasks, SQL extension usage, and full scheduler docs, see the main repo and docs site.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

honker-0.2.2-cp39-cp39-macosx_11_0_arm64.whl (498.4 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file honker-0.2.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for honker-0.2.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2556bb168e4abd9cb4bbeed8904e5777df7fffd1d538dbdeebabcd109ba03308
MD5 f6dee29b081e81691fc71830636d40e5
BLAKE2b-256 4499cbead05164f3fac1c5715ef77cbecfeed3df4be6a20b42864af3e0a7dd67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page