apso-domain-events (Python)
Transactional outbox + delivery for Apso services, built on SQLAlchemy 2.0
with an optional FastAPI integration. Implements the cross-language
CONTRACT.md.
state change ─(same DB txn)→ DomainEvent row (capture)
│
relay drains pending rows (poller)
│
fan out to active destination(s) (delivery)
Install
pip install apso-domain-events # webhook delivery needs no extra dep
pip install apso-domain-events[kafka] # confluent-kafka
pip install apso-domain-events[aws] # boto3 (sqs / eventbridge)
pip install apso-domain-events[fastapi] # FastAPI integration
Wire it
from apso_domain_events import register_domain_events
from myapp.models import Product, Order # the CLI-emitted manifest
register_domain_events(
engine, # Engine or sessionmaker
entities=[Product, Order], # only these emit; never hardcoded in the lib
poll_interval=5.0,
app=app, # optional FastAPI app → startup/shutdown poller
)
Create the events table from Base.metadata (or your migration tool):
from apso_domain_events import Base
Base.metadata.create_all(engine)
Delivery
The active destination(s) are chosen at runtime from EVENTS_DESTINATION
(comma-separated → fan-out):
| name | env | dependency |
|---|---|---|
webhook |
EVENTS_WEBHOOK_URL, EVENTS_WEBHOOK_SECRET |
none (stdlib HTTP + crypto) |
kafka |
EVENTS_KAFKA_BROKERS, EVENTS_KAFKA_TOPIC |
[kafka] |
sqs |
AWS_REGION, EVENTS_SQS_QUEUE_URL |
[aws] |
eventbridge |
AWS_REGION, EVENTS_EVENTBRIDGE_BUS |
[aws] |
At-least-once: fan-out re-sends to ALL destinations on retry. Consumers MUST dedupe on
event.id.
The webhook adapter signs requests per
Standard Webhooks (webhook-id,
webhook-timestamp, webhook-signature: v1,...).
Metadata
Release files for apso-domain-events 0.1.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 | Provenance | |
|---|---|---|---|---|
| apso_domain_events-0.1.0.tar.gz | 13.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apso_domain_events-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.6 kB
Release files / apso_domain_events-0.1.0.tar.gz
| Download URL | apso_domain_events-0.1.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e91081c5c98bbdcafd8ec9fa96df24dd05db4bec98aa4a464fb22efb3cd5eba5
|
|
BLAKE2b-256 checksum How to use checksums |
05b33f9aeb002b355ae96dd212eaec8a170644fa540700bf4adc7f240e859154
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 14, 2026.
Transparency logRelease files / apso_domain_events-0.1.0-py3-none-any.whl
| Download URL | apso_domain_events-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
beac5b4502a9b5329de9d7b9128eda3fae1fcb32aff9fc1f7131ee2eba0bf169
|
|
BLAKE2b-256 checksum How to use checksums |
8f72ba9d23c016ae88d0a407dc6efebc5d91071dff8c1a3a9e401f86e1d56eea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 14, 2026.
Transparency logSecurity for apso-domain-events 0.1.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for apso_domain_events-0.1.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 Jun 14, 2026.
Transparency logA 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.