Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Spakky Mediator

spakky-mediator is the optional in-process domain event consumer and dispatcher provider. spakky-event owns event contracts, publishing, transactional publication and handler-provider validation. Installing event support does not select a local consumer.

uv add spakky-event spakky-mediator
# Or use the explicit convenience extra:
uv add 'spakky[mediator]'
from spakky.core.application.application import SpakkyApplication
from spakky.core.application.plugin import Plugin

application = SpakkyApplication().load_plugins(include={
    Plugin(name="spakky-event"),
    Plugin(name="spakky-mediator"),
    Plugin(name="spakky-tracing"),
})

The plugin registers EventMediator, AsyncEventMediator and EventHandlerRegistrationPostProcessor. It registers only AbstractDomainEvent routes. Broker plugins own integration event routes independently, so loading mediator and Kafka together does not require a global IEventConsumer binding.

The role-specific consumer contracts are defined in spakky.event.event_consumer: IDomainEventConsumer and IAsyncDomainEventConsumer for local handlers, and IIntegrationEventConsumer and IAsyncIntegrationEventConsumer for broker handlers. The generic consumer interfaces remain available for existing application ports; applications with both provider categories should request a specific role.

An application declaring a handler without the matching synchronous/asynchronous provider fails startup with EventHandlerProviderUnavailableError. Publishing a domain event without a dispatcher raises DomainEventDispatcherUnavailableError; it never silently drops the event.

Migration

Install and explicitly select spakky-mediator where local domain dispatch is required. Update concrete imports:

from spakky.plugins.mediator.mediator import EventMediator, AsyncEventMediator
from spakky.plugins.mediator.post_processor import EventHandlerRegistrationPostProcessor

The historical spakky.event.mediator implementations and spakky.event.post_processor.EventHandlerRegistrationPostProcessor no longer belong to event core. Broker-only services need no mediator installation. No mediator dependency is hidden in the event extra.

Explicit deferral

A local handler may raise spakky.event.EventDeferredError before effects (or after its transaction rolls back). The mediator propagates this intentional deferral to the publisher instead of treating it as an ordinary resilient-handler error. It does not create a local durable retry queue. Kafka implements broker redelivery through partition pause/rewind, continuous polling and rebalance-aware timers.

Metadata

Release files for spakky-mediator 9.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for spakky-mediator 9.0.0
File Size Uploaded Provenance Actions
spakky_mediator-9.0.0.tar.gz 4.4 kB With provenance Details for spakky_mediator-9.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spakky-mediator 9.0.0
File Interpreter ABI Platform Actions
spakky_mediator-9.0.0-py3-none-any.whl Python 3 none any Details for spakky_mediator-9.0.0-py3-none-any.whl

Total release size: 10.1 kB

Release files / spakky_mediator-9.0.0.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL spakky_mediator-9.0.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
270a7ff44e62661f3970097a060e1e21224254feff42c438a6e5a228414e6d69
BLAKE2b-256 checksum
How to use checksums
00580c6b34bbb97ae702ea36fe1904d7fe66808319d0b06ac249bcad22670e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Release files / spakky_mediator-9.0.0-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL spakky_mediator-9.0.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abe6c0733e7b1ceee6e64e8fc101282bd27e208733d435576e3ff19020c0f468
BLAKE2b-256 checksum
How to use checksums
7cd99fea1f6801b073150c019bbbd1723ed80ad42827fe632abde18a69eb49fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Security for spakky-mediator 9.0.0

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.

Change of provenance

The configuration that created this release differs from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for spakky_mediator-9.0.0.tar.gz

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 Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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