python-cqrs 4.6.4__tar.gz → 4.6.5__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-4.6.4/src/python_cqrs.egg-info → python_cqrs-4.6.5}/PKG-INFO +1 -1
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/pyproject.toml +1 -1
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/models.py +7 -6
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/saga.py +2 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5/src/python_cqrs.egg-info}/PKG-INFO +1 -1
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/LICENSE +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/README.md +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/setup.cfg +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/adapters/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/adapters/amqp.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/adapters/circuit_breaker.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/adapters/kafka.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/adapters/protocol.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/compressors/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/compressors/protocol.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/compressors/zlib.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/container/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/container/dependency_injector.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/container/di.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/container/protocol.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/deserializers/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/deserializers/exceptions.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/deserializers/json.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/dispatcher/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/dispatcher/event.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/dispatcher/exceptions.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/dispatcher/models.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/dispatcher/request.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/dispatcher/saga.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/dispatcher/streaming.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/events/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/events/bootstrap.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/events/event.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/events/event_emitter.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/events/event_handler.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/events/event_processor.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/events/map.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/mediator.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/message_brokers/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/message_brokers/amqp.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/message_brokers/devnull.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/message_brokers/kafka.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/message_brokers/protocol.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/middlewares/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/middlewares/base.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/middlewares/logging.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/outbox/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/outbox/map.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/outbox/mock.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/outbox/repository.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/outbox/sqlalchemy.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/producer.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/requests/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/requests/bootstrap.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/requests/cor_request_handler.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/requests/map.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/requests/mermaid.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/requests/request.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/requests/request_handler.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/response.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/bootstrap.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/circuit_breaker.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/compensation.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/execution.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/fallback.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/mermaid.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/recovery.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/step.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/storage/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/storage/enums.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/storage/memory.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/storage/models.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/storage/protocol.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/storage/sqlalchemy.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/saga/validation.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/serializers/__init__.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/serializers/default.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/cqrs/types.py +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/python_cqrs.egg-info/SOURCES.txt +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/python_cqrs.egg-info/dependency_links.txt +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/python_cqrs.egg-info/requires.txt +0 -0
- {python_cqrs-4.6.4 → python_cqrs-4.6.5}/src/python_cqrs.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-cqrs
|
|
3
|
-
Version: 4.6.
|
|
3
|
+
Version: 4.6.5
|
|
4
4
|
Summary: Python CQRS pattern implementation
|
|
5
5
|
Author-email: Vadim Kozyrevskiy <vadikko2@mail.ru>, Dmitry Kutlubaev <kutlubaev00@mail.ru>
|
|
6
6
|
Maintainer-email: Vadim Kozyrevskiy <vadikko2@mail.ru>
|
|
@@ -31,7 +31,7 @@ maintainers = [{name = "Vadim Kozyrevskiy", email = "vadikko2@mail.ru"}]
|
|
|
31
31
|
name = "python-cqrs"
|
|
32
32
|
readme = "README.md"
|
|
33
33
|
requires-python = ">=3.10"
|
|
34
|
-
version = "4.6.
|
|
34
|
+
version = "4.6.5"
|
|
35
35
|
|
|
36
36
|
[project.optional-dependencies]
|
|
37
37
|
aiobreaker = ["aiobreaker>=0.3.0"]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import dataclasses
|
|
2
2
|
import typing
|
|
3
|
+
from dataclass_wizard import asdict, fromdict
|
|
3
4
|
|
|
4
5
|
# Type variable for from_dict classmethod return type
|
|
5
6
|
_T = typing.TypeVar("_T", bound="SagaContext")
|
|
@@ -29,7 +30,7 @@ class SagaContext:
|
|
|
29
30
|
Returns:
|
|
30
31
|
Dictionary representation of the context.
|
|
31
32
|
"""
|
|
32
|
-
return
|
|
33
|
+
return asdict(self)
|
|
33
34
|
|
|
34
35
|
@classmethod
|
|
35
36
|
def from_dict(cls: type[_T], data: dict[str, typing.Any]) -> _T:
|
|
@@ -42,11 +43,11 @@ class SagaContext:
|
|
|
42
43
|
Returns:
|
|
43
44
|
Instance of the context class.
|
|
44
45
|
"""
|
|
45
|
-
# Get field names from dataclass
|
|
46
|
-
field_names = {f.name for f in dataclasses.fields(cls)}
|
|
47
|
-
# Filter data to only include known fields
|
|
48
|
-
filtered_data = {k: v for k, v in data.items() if k in field_names}
|
|
49
|
-
return cls
|
|
46
|
+
# # Get field names from dataclass
|
|
47
|
+
# field_names = {f.name for f in dataclasses.fields(cls)}
|
|
48
|
+
# # Filter data to only include known fields
|
|
49
|
+
# filtered_data = {k: v for k, v in data.items() if k in field_names}
|
|
50
|
+
return fromdict(cls, data)
|
|
50
51
|
|
|
51
52
|
def model_dump(self) -> dict[str, typing.Any]:
|
|
52
53
|
"""
|
|
@@ -302,6 +302,8 @@ class SagaTransaction(typing.Generic[ContextT]):
|
|
|
302
302
|
|
|
303
303
|
yield step_result
|
|
304
304
|
|
|
305
|
+
# Update context one final time before marking as completed
|
|
306
|
+
await self._state_manager.update_context(self._context)
|
|
305
307
|
await self._state_manager.update_status(SagaStatus.COMPLETED)
|
|
306
308
|
|
|
307
309
|
except Exception as e:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-cqrs
|
|
3
|
-
Version: 4.6.
|
|
3
|
+
Version: 4.6.5
|
|
4
4
|
Summary: Python CQRS pattern implementation
|
|
5
5
|
Author-email: Vadim Kozyrevskiy <vadikko2@mail.ru>, Dmitry Kutlubaev <kutlubaev00@mail.ru>
|
|
6
6
|
Maintainer-email: Vadim Kozyrevskiy <vadikko2@mail.ru>
|
|
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
|
|
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
|