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 Distribution

honker-0.2.3.tar.gz (106.5 kB view details)

Uploaded Source

Built Distribution

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

honker-0.2.3-cp311-cp311-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file honker-0.2.3.tar.gz.

File metadata

  • Download URL: honker-0.2.3.tar.gz
  • Upload date:
  • Size: 106.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for honker-0.2.3.tar.gz
Algorithm Hash digest
SHA256 d939e388eec35e7916be5cbf20f14d05d3cde014b63efabbacab58d8ad35780a
MD5 7eb72bcc240ef11b68d6bb08190bf445
BLAKE2b-256 370884eb4cb5c0b0d692994be30a86cfdea6135435812ec61cf6ddd02bb36fc6

See more details on using hashes here.

File details

Details for the file honker-0.2.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for honker-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fbb053c809108e4d0e4ed953d1c2df5f01357c2bd4344c28f257a9adae5dd242
MD5 45ad9c4fb67a9caea2e2f35a2c198da1
BLAKE2b-256 fdbeb405a1cbeab7845e60d54aaa45b7d6d87a44b2df29300d144e6700a0a2a7

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