taskferry-events
Portable pub/sub and fan-out event delivery. Ships alongside Taskferry, the portable execution layer. Plain Python, no Django required.
An Event declares that something happened and may have zero or more consumers — the opposite of a Task, which is one operation to run. Modeled on CloudEvents.
pip install taskferry-events # in-memory bus
pip install taskferry-events[gcp] # + Google Cloud Pub/Sub
Usage
from taskferry_events import Event, publishers
publishers["default"].publish(
Event(type="file.uploaded", source="urn:svc:uploads", data={"file_id": "42"})
)
Fan-out with the in-process bus:
from taskferry_events import InMemoryEventBus, Event
bus = InMemoryEventBus()
bus.subscribe(lambda e: print("billing", e.data), event_type="order.placed")
bus.subscribe(lambda e: print("analytics", e.data)) # sees everything
bus.publish(Event(type="order.placed", source="urn:shop", data={"total": 10}))
Configure a provider publisher (lazy — no SDK imported until first use):
from taskferry_events import publishers
publishers.configure(
{
"default": {
"factory": "taskferry_events.adapters.gcp:make_pubsub_publisher",
"project": "my-proj",
"topic": "domain-events",
"ordering": True,
},
}
)
Task vs Event
Task → one operation to execute (~1 consumer)
Event → a fact that happened (0..N consumers, fan-out)
Capabilities
Adapters advertise what they support (fanout, ordering, delivery_retry,
dead_letter, filtering, replay, retention). Requesting replay on a
backend that lacks it raises UnsupportedCapabilityError.
| Adapter | Provider | Capabilities |
|---|---|---|
InMemoryEventBus |
inmemory | fanout, filtering, replay, retention |
PubSubPublisher |
gcp | fanout, delivery_retry, dead_letter, filtering, retention (+ ordering) |
SnsPublisher |
aws | fanout, delivery_retry, dead_letter, filtering (+ ordering on FIFO) |
EventBridgePublisher |
aws | fanout, delivery_retry, dead_letter, filtering, retention, replay |
EventGridPublisher |
azure | fanout, delivery_retry, dead_letter, filtering, retention |
KafkaPublisher |
kafka | fanout, ordering, delivery_retry, retention, replay |
Roadmap: NATS, RabbitMQ.
Delivery semantics
At-least-once with possible duplicates (ADR-0010). Consumers must be idempotent.
License
Apache-2.0.
Release files for taskferry-events 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| taskferry_events-0.3.0.tar.gz | 15.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| taskferry_events-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.2 kB
Release files / taskferry_events-0.3.0.tar.gz
| Download URL | taskferry_events-0.3.0.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02d67aed049187d51ff5e796167eb540282eedd8e1496ee5a3ba545e08f13cf6
|
|
BLAKE2b-256 checksum How to use checksums |
05c99538a5ed11dbce816e4d0a9ed0dafefd67d57bd5f41f235c8969b8717d3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / taskferry_events-0.3.0-py3-none-any.whl
| Download URL | taskferry_events-0.3.0-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d5f7eb31874bac01c14797eccc74f517b74bc58e4aea30fe15c2e56a7b3f42a
|
|
BLAKE2b-256 checksum How to use checksums |
c45812aec6add493794be4255296c5304bdaa5fcc3d53766c934c80f0208cdf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency log