Skip to main content

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 are registered on a Scheduler. Build the schedule with crontab(expr) or every_s(n), then run the scheduler loop (it enqueues onto the target queue on each boundary; a normal worker claims the jobs):

from honker import Scheduler, crontab, every_s

sched = Scheduler(db)
sched.add(name="fast", queue="emails", schedule=every_s(1), payload={"kind": "tick"})
sched.add(name="nightly", queue="emails", schedule=crontab("0 3 * * *"))

await sched.run()  # acquires the leader lock and fires due tasks

add() is keyword-only and schedule must be a CronSchedule (from crontab or every_s), not a raw string. Supported schedule expressions:

  • 5-field cron: crontab("0 3 * * *")
  • 6-field cron: crontab("*/2 * * * * *")
  • interval: every_s(1) (use every_s, not crontab("@every …"))

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.
  • Construct db.queue(name) handles outside an open db.transaction(). First open for a name runs schema init in its own write transaction; doing that inside an outer transaction() raises RuntimeError (would otherwise deadlock the single writer). Create the handle first, then pass tx= to enqueue.

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

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 Distributions

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

honker-0.5.0-cp311-abi3-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.11+Windows x86-64

honker-0.5.0-cp311-abi3-manylinux_2_38_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.38+ x86-64

honker-0.5.0-cp311-abi3-manylinux_2_38_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.38+ ARM64

honker-0.5.0-cp311-abi3-macosx_11_0_arm64.whl (978.0 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

honker-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl (995.7 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file honker-0.5.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: honker-0.5.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for honker-0.5.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 62e78378b4212ad9c04a4dd51b5ca57ff3d4e259271170a88745db60c3179602
MD5 65e3a5e4fae63b5164875fb3a4b7bcf7
BLAKE2b-256 49b62ad40cfe8d35ca733ad51fb1334de03a71e1dc000826331e12f67f77485f

See more details on using hashes here.

File details

Details for the file honker-0.5.0-cp311-abi3-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for honker-0.5.0-cp311-abi3-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 c61cc173db699f5fbbc09f1821069416e8874075e16ee571d76c75a7be96e37e
MD5 e175bd7299aa7a28b0067c9a44bb07ba
BLAKE2b-256 1dd0fe00b8f44e03c33aa6408c9defd902a47221fbd18045d155fbbac40b8736

See more details on using hashes here.

File details

Details for the file honker-0.5.0-cp311-abi3-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for honker-0.5.0-cp311-abi3-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 ed99bd11a5dc47714b5484c8ba3dc12e10b6a871c610acff3488da822f3a34a4
MD5 d12ddd97f5b18fc214cf1cfb254f05b9
BLAKE2b-256 0534ba7836904f2c6d0e14d1257606f83d2ace01f0df63e5705c112da27a530e

See more details on using hashes here.

File details

Details for the file honker-0.5.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for honker-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e7d7a1c566d6f9b43abe2f17115d7859b57e922dccd73f2edf16d07fd77d85bd
MD5 f4a979dcb0c6f41891da96d36d45fdcf
BLAKE2b-256 695a6ac3666dbfaab0c14c3f70566eeb908872d348e2456616efe4eea9760596

See more details on using hashes here.

File details

Details for the file honker-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for honker-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 190a827be3485af2aef66320adbbcba2a3595a03e6c4afe3bcd7f26e3961de82
MD5 724022749f6419fd484b8de23967d65e
BLAKE2b-256 6b1977a30cfcafd6036cb409245dcccc2f354842cb12aa07ca044243aa55a4be

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

5 files

0.4.0

5 files

0.2.7

5 files

0.2.6

5 files

0.2.5

5 files

0.2.4

2 files

0.2.3

2 files

0.2.2

1 file

0.2.1

2 files

0.1.0

5 files

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