python-cqrs 4.6.3__tar.gz → 4.6.4__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.3/src/python_cqrs.egg-info → python_cqrs-4.6.4}/PKG-INFO +1 -1
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/pyproject.toml +1 -1
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/message_brokers/protocol.py +2 -1
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/storage/sqlalchemy.py +16 -3
- {python_cqrs-4.6.3 → python_cqrs-4.6.4/src/python_cqrs.egg-info}/PKG-INFO +1 -1
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/LICENSE +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/README.md +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/setup.cfg +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/adapters/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/adapters/amqp.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/adapters/circuit_breaker.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/adapters/kafka.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/adapters/protocol.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/compressors/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/compressors/protocol.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/compressors/zlib.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/container/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/container/dependency_injector.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/container/di.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/container/protocol.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/deserializers/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/deserializers/exceptions.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/deserializers/json.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/dispatcher/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/dispatcher/event.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/dispatcher/exceptions.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/dispatcher/models.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/dispatcher/request.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/dispatcher/saga.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/dispatcher/streaming.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/events/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/events/bootstrap.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/events/event.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/events/event_emitter.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/events/event_handler.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/events/event_processor.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/events/map.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/mediator.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/message_brokers/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/message_brokers/amqp.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/message_brokers/devnull.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/message_brokers/kafka.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/middlewares/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/middlewares/base.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/middlewares/logging.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/outbox/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/outbox/map.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/outbox/mock.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/outbox/repository.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/outbox/sqlalchemy.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/producer.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/requests/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/requests/bootstrap.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/requests/cor_request_handler.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/requests/map.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/requests/mermaid.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/requests/request.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/requests/request_handler.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/response.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/bootstrap.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/circuit_breaker.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/compensation.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/execution.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/fallback.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/mermaid.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/models.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/recovery.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/saga.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/step.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/storage/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/storage/enums.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/storage/memory.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/storage/models.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/storage/protocol.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/saga/validation.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/serializers/__init__.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/serializers/default.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/cqrs/types.py +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/python_cqrs.egg-info/SOURCES.txt +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/python_cqrs.egg-info/dependency_links.txt +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/src/python_cqrs.egg-info/requires.txt +0 -0
- {python_cqrs-4.6.3 → python_cqrs-4.6.4}/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.4
|
|
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.4"
|
|
35
35
|
|
|
36
36
|
[project.optional-dependencies]
|
|
37
37
|
aiobreaker = ["aiobreaker>=0.3.0"]
|
|
@@ -2,6 +2,7 @@ import abc
|
|
|
2
2
|
import dataclasses
|
|
3
3
|
import typing
|
|
4
4
|
import uuid
|
|
5
|
+
from dataclass_wizard import asdict
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
@dataclasses.dataclass
|
|
@@ -28,7 +29,7 @@ class Message:
|
|
|
28
29
|
Returns:
|
|
29
30
|
A dictionary containing all fields of the message instance.
|
|
30
31
|
"""
|
|
31
|
-
return
|
|
32
|
+
return asdict(self)
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
class MessageBroker(abc.ABC):
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import logging
|
|
3
|
+
import os
|
|
3
4
|
import typing
|
|
4
5
|
import uuid
|
|
5
6
|
|
|
7
|
+
import dotenv
|
|
6
8
|
import sqlalchemy
|
|
7
9
|
from sqlalchemy import func
|
|
8
10
|
from sqlalchemy.exc import SQLAlchemyError
|
|
@@ -17,12 +19,23 @@ from cqrs.saga.storage.protocol import ISagaStorage
|
|
|
17
19
|
Base = registry().generate_base()
|
|
18
20
|
logger = logging.getLogger(__name__)
|
|
19
21
|
|
|
22
|
+
dotenv.load_dotenv()
|
|
23
|
+
|
|
20
24
|
DEFAULT_SAGA_EXECUTION_TABLE_NAME = "saga_executions"
|
|
21
25
|
DEFAULT_SAGA_LOG_TABLE_NAME = "saga_logs"
|
|
22
26
|
|
|
27
|
+
SAGA_EXECUTION_TABLE_NAME = os.getenv(
|
|
28
|
+
"CQRS_SAGA_EXECUTION_TABLE_NAME",
|
|
29
|
+
DEFAULT_SAGA_EXECUTION_TABLE_NAME,
|
|
30
|
+
)
|
|
31
|
+
SAGA_LOG_TABLE_NAME = os.getenv(
|
|
32
|
+
"CQRS_SAGA_LOG_TABLE_NAME",
|
|
33
|
+
DEFAULT_SAGA_LOG_TABLE_NAME,
|
|
34
|
+
)
|
|
35
|
+
|
|
23
36
|
|
|
24
37
|
class SagaExecutionModel(Base):
|
|
25
|
-
__tablename__ =
|
|
38
|
+
__tablename__ = SAGA_EXECUTION_TABLE_NAME
|
|
26
39
|
|
|
27
40
|
id = sqlalchemy.Column(
|
|
28
41
|
sqlalchemy.Uuid,
|
|
@@ -68,7 +81,7 @@ class SagaExecutionModel(Base):
|
|
|
68
81
|
|
|
69
82
|
|
|
70
83
|
class SagaLogModel(Base):
|
|
71
|
-
__tablename__ =
|
|
84
|
+
__tablename__ = SAGA_LOG_TABLE_NAME
|
|
72
85
|
|
|
73
86
|
id = sqlalchemy.Column(
|
|
74
87
|
sqlalchemy.BigInteger(),
|
|
@@ -80,7 +93,7 @@ class SagaLogModel(Base):
|
|
|
80
93
|
)
|
|
81
94
|
saga_id = sqlalchemy.Column(
|
|
82
95
|
sqlalchemy.Uuid,
|
|
83
|
-
sqlalchemy.ForeignKey(f"{
|
|
96
|
+
sqlalchemy.ForeignKey(f"{SAGA_EXECUTION_TABLE_NAME}.id"),
|
|
84
97
|
nullable=False,
|
|
85
98
|
comment="Saga ID",
|
|
86
99
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-cqrs
|
|
3
|
-
Version: 4.6.
|
|
3
|
+
Version: 4.6.4
|
|
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
|