@@ -26,16 +26,16 @@ Package-first universal event infrastructure for microservices.
2626## Installation
2727
2828``` bash
29- pip install python-eventing
29+ pip install messagekit
3030# or
31- poetry add python-eventing
31+ poetry add messagekit
3232```
3333
34- ** Import package name:** ` messaging ` (distribution is ` python-eventing ` )
34+ ** Import package name:** ` messagekit ` (distribution is ` messagekit ` )
3535
3636``` python
37- from messaging .core import BaseEvent
38- from messaging .infrastructure import SqlAlchemyOutboxRepository
37+ from messagekit .core import BaseEvent
38+ from messagekit .infrastructure import SqlAlchemyOutboxRepository
3939```
4040
4141** Requirements:**
@@ -47,15 +47,15 @@ Support scale: `❌` none, `✅` basic, `✅✅` strong, `✅✅✅` first-class
4747
4848## Comparison with alternatives
4949
50- ` python-eventing ` prioritizes ** durable messaging** (transactional outbox + CDC) and ** Kafka/RabbitMQ integration** over in-process event simplicity:
50+ ` messagekit ` prioritizes ** durable messaging** (transactional outbox + CDC) and ** Kafka/RabbitMQ integration** over in-process event simplicity:
5151
52- | Capability | ` python-eventing ` | [ ` pyventus ` ] ( https://github.com/mdapena/pyventus ) | [ ` fastapi-events ` ] ( https://github.com/melvinkcx/fastapi-events ) | Notes |
52+ | Capability | ` messagekit ` | [ ` pyventus ` ] ( https://github.com/mdapena/pyventus ) | [ ` fastapi-events ` ] ( https://github.com/melvinkcx/fastapi-events ) | Notes |
5353| --- | --- | --- | --- | --- |
5454| Transactional outbox | ✅✅✅ | ❌ | ❌ | Durable local DB plus outbox boundary is a core feature here |
5555| Kafka data plane | ✅✅✅ | ❌ | ❌ | This package is built for Kafka-backed microservice messaging |
5656| DLQ handling | ✅✅✅ | ❌ | ❌ | Leverages native RabbitMQ DLX and Kafka Connect DLQ SMT with database bookkeeping |
5757| Health checks for eventing runtime | ✅✅✅ | ❌ | ❌ | Outbox health checks plus FastStream ASGI broker health endpoint |
58- | Typed cross-service event contracts | ✅✅ | ✅ | ✅✅ | ` python-eventing ` and ` fastapi-events ` are stronger on explicit payload modeling |
58+ | Typed cross-service event contracts | ✅✅ | ✅ | ✅✅ | ` messagekit ` and ` fastapi-events ` are stronger on explicit payload modeling |
5959| Decorator subscriber registration | ✅✅ | ✅✅✅ | ✅✅ | ` EventBus.subscriber(...) ` exists now; ` pyventus ` is still the most polished here |
6060| In-process dispatch backend abstraction | ✅✅ | ✅✅✅ | ✅ | ` DispatchBackend ` exists here; ` pyventus ` offers a broader processor model |
6161| Lifecycle hooks / callbacks | ✅✅ | ✅✅✅ | ✅ | ` DispatchHooks ` covers dispatch, success, failure, disabled, and debug |
@@ -70,7 +70,7 @@ Support scale: `❌` none, `✅` basic, `✅✅` strong, `✅✅✅` first-class
7070
7171## When to use this package
7272
73- ** Use ` python-eventing ` if you need:**
73+ ** Use ` messagekit ` if you need:**
7474- Guaranteed event delivery via transactional outbox pattern
7575- Kafka-based microservice messaging with CDC publishing
7676- Dead letter queue handling with database bookkeeping
@@ -220,7 +220,7 @@ flowchart LR
220220│ YOUR SERVICE (FastAPI) │
221221│ │
222222│ ┌──────────────┐ ┌──────────────────────────────────────────────┐ │
223- │ │ Routes │──┬──▶│ python-eventing (SHARED CONTRACTS) │ │
223+ │ │ Routes │──┬──▶│ messagekit (SHARED CONTRACTS) │ │
224224│ └──────────────┘ │ │ │ │
225225│ │ │ • BaseEvent (Pydantic base) │ │
226226│ │ │ • IOutboxRepository (Protocol) │ │
@@ -229,7 +229,7 @@ flowchart LR
229229│ │ │ Uses contracts │
230230│ │ ▼ │
231231│ │ ┌──────────────────────────────────────────────┐ │
232- │ │ │ python-eventing (implementations) │ │
232+ │ │ │ messagekit (implementations) │ │
233233│ │ │ │ │
234234│ │ │ ┌────────────────────────────────────────┐ │ │
235235│ │ │ │ WRITE SIDE (Primary) │ │ │
@@ -310,7 +310,7 @@ flowchart LR
310310 │ │ DOWNSTREAM SERVICES │
311311 │ │ │
312312 │ │ ┌──────────────────────────────────────────────┐ │
313- │ │ │ READ SIDE (python-eventing ) │ │
313+ │ │ │ READ SIDE (messagekit ) │ │
314314 │ │ │ │ │
315315 │ │ │ @broker.subscriber("user.created") │ │
316316 │ │ │ async def handle(event: UserCreated): │ │
@@ -412,7 +412,7 @@ async def handle_user_created(event: UserCreatedEvent): # ✅ Already a Pydanti
412412- 🏥 ** Native health checks** : ` make_ping_asgi ` endpoint for broker status
413413- 🔀 ** Unified API** : Same code works for Kafka, RabbitMQ, NATS, Redis Streams
414414
415- ` python-eventing ` uses FastStream for all Kafka/RabbitMQ interactions, giving you a clean, Pythonic API while handling all the low-level complexity.
415+ ` messagekit ` uses FastStream for all Kafka/RabbitMQ interactions, giving you a clean, Pythonic API while handling all the low-level complexity.
416416
417417## Setup
418418
@@ -446,8 +446,8 @@ Initialize the outbox repository and event bus at application startup:
446446``` python
447447from fastapi import FastAPI
448448from sqlalchemy.ext.asyncio import create_async_engine
449- from messaging .infrastructure import SqlAlchemyOutboxRepository
450- from messaging .core import build_event_bus
449+ from messagekit .infrastructure import SqlAlchemyOutboxRepository
450+ from messagekit .core import build_event_bus
451451
452452app = FastAPI()
453453
@@ -473,8 +473,8 @@ The **core pattern** is the transactional outbox - persist events atomically wit
473473
474474``` python
475475from fastapi import Depends
476- from messaging .core import BaseEvent
477- from messaging .infrastructure import SqlAlchemyOutboxRepository
476+ from messagekit .core import BaseEvent
477+ from messagekit .infrastructure import SqlAlchemyOutboxRepository
478478
479479# Define domain event
480480class UserCreated (BaseEvent ):
@@ -520,8 +520,8 @@ async def create_user(
520520For ** decoupled architectures** with multiple side effects per event, use the ** EventBus** abstraction layer:
521521
522522``` python
523- from messaging .core import BaseEvent
524- from messaging .infrastructure import OutboxEventHandler
523+ from messagekit .core import BaseEvent
524+ from messagekit .infrastructure import OutboxEventHandler
525525
526526# Access EventBus (initialized at startup)
527527event_bus = request.app.state.event_bus
@@ -551,16 +551,16 @@ await event_bus.dispatch(UserCreated(...))
551551
552552## Distribution
553553
554- - PyPI distribution name: ` python-eventing `
555- - Python import package: ` messaging `
554+ - PyPI distribution name: ` messagekit `
555+ - Python import package: ` messagekit `
556556
557557``` python
558558# Install
559- pip install python - eventing
559+ pip install messagekit
560560
561561# Import
562- from messaging .core import BaseEvent
563- from messaging .infrastructure import SqlAlchemyOutboxRepository
562+ from messagekit .core import BaseEvent
563+ from messagekit .infrastructure import SqlAlchemyOutboxRepository
564564```
565565
566566Services should consume the published package rather than source checkout. Kafka remains shared infrastructure with local producer/consumer clients per service.
0 commit comments