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

The Python wheel includes Honker's SQLite loadable extension when the package is built through the release/proof workflow. To load Honker into your own sqlite3 or ORM connection:

import honker
import sqlite3

conn = sqlite3.connect("app.db")
honker.load_extension(conn)
conn.execute("SELECT honker_bootstrap()")

If a client needs the raw pieces instead, use extension_info():

path, entrypoint = honker.extension_info()

For local source builds, build and copy the extension before building the wheel:

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

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.4.tar.gz (138.0 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.4-cp314-cp314-macosx_11_0_arm64.whl (859.0 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for honker-0.2.4.tar.gz
Algorithm Hash digest
SHA256 4cf358eca925a3ddcf3e5011c12fe607d31476de599bcbd8cef1347a9ecde8bd
MD5 dae138531cc44e35aa38b08a11fbcae1
BLAKE2b-256 641071e6faeb50dc53399127644c7e28f3c68ca0661dce463b10513f8cdd4896

See more details on using hashes here.

File details

Details for the file honker-0.2.4-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for honker-0.2.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e11b047fc9494239b9e064965f0521a5ac43b3897db0e9bff49e8f26145c4b25
MD5 5c1011dec0c8eae2a3f0d2e9e113d8d2
BLAKE2b-256 a7ab146630de7d2262d2f491637618f7fb1d712a8445ac06b0a141bfa9078328

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