python-cqrs 2.5.0__tar.gz → 2.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/PKG-INFO +10 -11
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/README.md +8 -9
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/pyproject.toml +1 -1
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/python_cqrs.egg-info/PKG-INFO +10 -11
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/LICENSE +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/setup.cfg +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/adapters/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/adapters/amqp.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/adapters/kafka.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/compressors/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/compressors/protocol.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/compressors/zlib.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/container/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/container/di.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/container/protocol.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/deserializers/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/deserializers/json.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/deserializers/protobuf.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/dispatcher/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/dispatcher/dispatcher.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/events/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/events/bootstrap.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/events/event.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/events/event_emitter.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/events/event_handler.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/events/map.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/mediator.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/message_brokers/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/message_brokers/amqp.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/message_brokers/devnull.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/message_brokers/kafka.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/message_brokers/protocol.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/middlewares/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/middlewares/base.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/middlewares/logging.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/outbox/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/outbox/map.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/outbox/mock.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/outbox/repository.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/outbox/sqlalchemy.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/producer.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/requests/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/requests/bootstrap.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/requests/map.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/requests/request.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/requests/request_handler.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/response.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/serializers/__init__.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/serializers/default.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/cqrs/serializers/protobuf.py +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/python_cqrs.egg-info/SOURCES.txt +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/python_cqrs.egg-info/dependency_links.txt +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/python_cqrs.egg-info/requires.txt +0 -0
- {python_cqrs-2.5.0 → python_cqrs-2.5.1}/src/python_cqrs.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: python-cqrs
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.1
|
|
4
4
|
Summary: Python CQRS pattern implementation
|
|
5
5
|
Author-email: Vadim Kozyrevskiy <vadikko2@mail.ru>
|
|
6
6
|
Maintainer-email: Vadim Kozyrevskiy <vadikko2@mail.ru>
|
|
@@ -173,10 +173,9 @@ class UserJoinedEventHandler(cqrs.EventHandler[UserJoined]):
|
|
|
173
173
|
A complete example can be found in
|
|
174
174
|
the [documentation](https://github.com/vadikko2/cqrs/blob/master/examples/domain_event_handler.py)
|
|
175
175
|
|
|
176
|
-
## Producing Notification
|
|
176
|
+
## Producing Notification Events
|
|
177
177
|
|
|
178
|
-
During the handling of a command
|
|
179
|
-
and then sent to the broker.
|
|
178
|
+
During the handling of a command, `cqrs.NotificationEvent` events may be generated and then sent to the broker.
|
|
180
179
|
|
|
181
180
|
```python
|
|
182
181
|
class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
@@ -200,7 +199,7 @@ class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
|
200
199
|
)
|
|
201
200
|
)
|
|
202
201
|
self._events.append(
|
|
203
|
-
cqrs.
|
|
202
|
+
cqrs.NotificationEvent[UserJoinedECSTPayload](
|
|
204
203
|
event_name="UserJoined",
|
|
205
204
|
topic="user_ecst_events",
|
|
206
205
|
payload=UserJoinedECSTPayload(
|
|
@@ -279,7 +278,7 @@ class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
|
279
278
|
)
|
|
280
279
|
self.outbox.add(
|
|
281
280
|
session,
|
|
282
|
-
cqrs.
|
|
281
|
+
cqrs.NotificationEvent[UserJoinedECSTPayload](
|
|
283
282
|
event_name="UserJoined",
|
|
284
283
|
topic="user_ecst_events",
|
|
285
284
|
payload=UserJoinedECSTPayload(
|
|
@@ -397,7 +396,7 @@ def init_queries(mapper: requests.RequestMap) -> None:
|
|
|
397
396
|
|
|
398
397
|
def init_events(mapper: events.EventMap) -> None:
|
|
399
398
|
mapper.bind(events.NotificationEvent[events_models.NotificationMeetingRoomClosed], event_handlers.MeetingRoomClosedNotificationHandler)
|
|
400
|
-
mapper.bind(events.
|
|
399
|
+
mapper.bind(events.NotificationEvent[event_models.ECSTMeetingRoomClosed], event_handlers.UpdateMeetingRoomReadModelHandler)
|
|
401
400
|
```
|
|
402
401
|
|
|
403
402
|
## Bootstrap
|
|
@@ -494,8 +493,8 @@ class HelloWorldPayload(pydantic.BaseModel):
|
|
|
494
493
|
world: str = pydantic.Field(default="World")
|
|
495
494
|
|
|
496
495
|
|
|
497
|
-
class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.
|
|
498
|
-
async def handle(self, event: cqrs.
|
|
496
|
+
class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.NotificationEvent[HelloWorldPayload]]):
|
|
497
|
+
async def handle(self, event: cqrs.NotificationEvent[HelloWorldPayload]) -> None:
|
|
499
498
|
print(f"{event.payload.hello} {event.payload.world}") # type: ignore
|
|
500
499
|
|
|
501
500
|
|
|
@@ -506,7 +505,7 @@ class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.ECSTEvent[HelloWorldPayl
|
|
|
506
505
|
value_deserializer=value_deserializer,
|
|
507
506
|
)
|
|
508
507
|
async def hello_world_event_handler(
|
|
509
|
-
body: cqrs.
|
|
508
|
+
body: cqrs.NotificationEvent[HelloWorldPayload] | None,
|
|
510
509
|
msg: kafka.KafkaMessage,
|
|
511
510
|
mediator: cqrs.EventMediator = faststream.Depends(mediator_factory),
|
|
512
511
|
):
|
|
@@ -129,10 +129,9 @@ class UserJoinedEventHandler(cqrs.EventHandler[UserJoined]):
|
|
|
129
129
|
A complete example can be found in
|
|
130
130
|
the [documentation](https://github.com/vadikko2/cqrs/blob/master/examples/domain_event_handler.py)
|
|
131
131
|
|
|
132
|
-
## Producing Notification
|
|
132
|
+
## Producing Notification Events
|
|
133
133
|
|
|
134
|
-
During the handling of a command
|
|
135
|
-
and then sent to the broker.
|
|
134
|
+
During the handling of a command, `cqrs.NotificationEvent` events may be generated and then sent to the broker.
|
|
136
135
|
|
|
137
136
|
```python
|
|
138
137
|
class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
@@ -156,7 +155,7 @@ class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
|
156
155
|
)
|
|
157
156
|
)
|
|
158
157
|
self._events.append(
|
|
159
|
-
cqrs.
|
|
158
|
+
cqrs.NotificationEvent[UserJoinedECSTPayload](
|
|
160
159
|
event_name="UserJoined",
|
|
161
160
|
topic="user_ecst_events",
|
|
162
161
|
payload=UserJoinedECSTPayload(
|
|
@@ -235,7 +234,7 @@ class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
|
235
234
|
)
|
|
236
235
|
self.outbox.add(
|
|
237
236
|
session,
|
|
238
|
-
cqrs.
|
|
237
|
+
cqrs.NotificationEvent[UserJoinedECSTPayload](
|
|
239
238
|
event_name="UserJoined",
|
|
240
239
|
topic="user_ecst_events",
|
|
241
240
|
payload=UserJoinedECSTPayload(
|
|
@@ -353,7 +352,7 @@ def init_queries(mapper: requests.RequestMap) -> None:
|
|
|
353
352
|
|
|
354
353
|
def init_events(mapper: events.EventMap) -> None:
|
|
355
354
|
mapper.bind(events.NotificationEvent[events_models.NotificationMeetingRoomClosed], event_handlers.MeetingRoomClosedNotificationHandler)
|
|
356
|
-
mapper.bind(events.
|
|
355
|
+
mapper.bind(events.NotificationEvent[event_models.ECSTMeetingRoomClosed], event_handlers.UpdateMeetingRoomReadModelHandler)
|
|
357
356
|
```
|
|
358
357
|
|
|
359
358
|
## Bootstrap
|
|
@@ -450,8 +449,8 @@ class HelloWorldPayload(pydantic.BaseModel):
|
|
|
450
449
|
world: str = pydantic.Field(default="World")
|
|
451
450
|
|
|
452
451
|
|
|
453
|
-
class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.
|
|
454
|
-
async def handle(self, event: cqrs.
|
|
452
|
+
class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.NotificationEvent[HelloWorldPayload]]):
|
|
453
|
+
async def handle(self, event: cqrs.NotificationEvent[HelloWorldPayload]) -> None:
|
|
455
454
|
print(f"{event.payload.hello} {event.payload.world}") # type: ignore
|
|
456
455
|
|
|
457
456
|
|
|
@@ -462,7 +461,7 @@ class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.ECSTEvent[HelloWorldPayl
|
|
|
462
461
|
value_deserializer=value_deserializer,
|
|
463
462
|
)
|
|
464
463
|
async def hello_world_event_handler(
|
|
465
|
-
body: cqrs.
|
|
464
|
+
body: cqrs.NotificationEvent[HelloWorldPayload] | None,
|
|
466
465
|
msg: kafka.KafkaMessage,
|
|
467
466
|
mediator: cqrs.EventMediator = faststream.Depends(mediator_factory),
|
|
468
467
|
):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: python-cqrs
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.1
|
|
4
4
|
Summary: Python CQRS pattern implementation
|
|
5
5
|
Author-email: Vadim Kozyrevskiy <vadikko2@mail.ru>
|
|
6
6
|
Maintainer-email: Vadim Kozyrevskiy <vadikko2@mail.ru>
|
|
@@ -173,10 +173,9 @@ class UserJoinedEventHandler(cqrs.EventHandler[UserJoined]):
|
|
|
173
173
|
A complete example can be found in
|
|
174
174
|
the [documentation](https://github.com/vadikko2/cqrs/blob/master/examples/domain_event_handler.py)
|
|
175
175
|
|
|
176
|
-
## Producing Notification
|
|
176
|
+
## Producing Notification Events
|
|
177
177
|
|
|
178
|
-
During the handling of a command
|
|
179
|
-
and then sent to the broker.
|
|
178
|
+
During the handling of a command, `cqrs.NotificationEvent` events may be generated and then sent to the broker.
|
|
180
179
|
|
|
181
180
|
```python
|
|
182
181
|
class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
@@ -200,7 +199,7 @@ class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
|
200
199
|
)
|
|
201
200
|
)
|
|
202
201
|
self._events.append(
|
|
203
|
-
cqrs.
|
|
202
|
+
cqrs.NotificationEvent[UserJoinedECSTPayload](
|
|
204
203
|
event_name="UserJoined",
|
|
205
204
|
topic="user_ecst_events",
|
|
206
205
|
payload=UserJoinedECSTPayload(
|
|
@@ -279,7 +278,7 @@ class JoinMeetingCommandHandler(cqrs.RequestHandler[JoinMeetingCommand, None]):
|
|
|
279
278
|
)
|
|
280
279
|
self.outbox.add(
|
|
281
280
|
session,
|
|
282
|
-
cqrs.
|
|
281
|
+
cqrs.NotificationEvent[UserJoinedECSTPayload](
|
|
283
282
|
event_name="UserJoined",
|
|
284
283
|
topic="user_ecst_events",
|
|
285
284
|
payload=UserJoinedECSTPayload(
|
|
@@ -397,7 +396,7 @@ def init_queries(mapper: requests.RequestMap) -> None:
|
|
|
397
396
|
|
|
398
397
|
def init_events(mapper: events.EventMap) -> None:
|
|
399
398
|
mapper.bind(events.NotificationEvent[events_models.NotificationMeetingRoomClosed], event_handlers.MeetingRoomClosedNotificationHandler)
|
|
400
|
-
mapper.bind(events.
|
|
399
|
+
mapper.bind(events.NotificationEvent[event_models.ECSTMeetingRoomClosed], event_handlers.UpdateMeetingRoomReadModelHandler)
|
|
401
400
|
```
|
|
402
401
|
|
|
403
402
|
## Bootstrap
|
|
@@ -494,8 +493,8 @@ class HelloWorldPayload(pydantic.BaseModel):
|
|
|
494
493
|
world: str = pydantic.Field(default="World")
|
|
495
494
|
|
|
496
495
|
|
|
497
|
-
class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.
|
|
498
|
-
async def handle(self, event: cqrs.
|
|
496
|
+
class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.NotificationEvent[HelloWorldPayload]]):
|
|
497
|
+
async def handle(self, event: cqrs.NotificationEvent[HelloWorldPayload]) -> None:
|
|
499
498
|
print(f"{event.payload.hello} {event.payload.world}") # type: ignore
|
|
500
499
|
|
|
501
500
|
|
|
@@ -506,7 +505,7 @@ class HelloWorldECSTEventHandler(cqrs.EventHandler[cqrs.ECSTEvent[HelloWorldPayl
|
|
|
506
505
|
value_deserializer=value_deserializer,
|
|
507
506
|
)
|
|
508
507
|
async def hello_world_event_handler(
|
|
509
|
-
body: cqrs.
|
|
508
|
+
body: cqrs.NotificationEvent[HelloWorldPayload] | None,
|
|
510
509
|
msg: kafka.KafkaMessage,
|
|
511
510
|
mediator: cqrs.EventMediator = faststream.Depends(mediator_factory),
|
|
512
511
|
):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|