python-cqrs 2.1.0__tar.gz → 2.3.0__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.1.0 → python_cqrs-2.3.0}/PKG-INFO +1 -1
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/pyproject.toml +1 -1
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/deserializers/json.py +1 -1
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/outbox/repository.py +0 -16
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/outbox/sqlalchemy.py +0 -18
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/python_cqrs.egg-info/PKG-INFO +1 -1
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/LICENSE +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/README.md +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/setup.cfg +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/adapters/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/adapters/amqp.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/adapters/kafka.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/compressors/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/compressors/protocol.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/compressors/zlib.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/container/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/container/di.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/container/protocol.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/deserializers/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/deserializers/protobuf.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/dispatcher/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/dispatcher/dispatcher.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/events/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/events/bootstrap.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/events/event.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/events/event_emitter.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/events/event_handler.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/events/map.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/mediator.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/message_brokers/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/message_brokers/amqp.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/message_brokers/devnull.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/message_brokers/kafka.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/message_brokers/protocol.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/middlewares/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/middlewares/base.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/middlewares/logging.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/outbox/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/outbox/map.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/outbox/mock.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/producer.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/requests/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/requests/bootstrap.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/requests/map.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/requests/request.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/requests/request_handler.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/response.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/serializers/__init__.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/serializers/default.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/cqrs/serializers/protobuf.py +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/python_cqrs.egg-info/SOURCES.txt +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/python_cqrs.egg-info/dependency_links.txt +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/python_cqrs.egg-info/requires.txt +0 -0
- {python_cqrs-2.1.0 → python_cqrs-2.3.0}/src/python_cqrs.egg-info/top_level.txt +0 -0
|
@@ -12,7 +12,7 @@ class JsonDeserializer(typing.Generic[_T]):
|
|
|
12
12
|
def __init__(self, model: typing.Type[_T]):
|
|
13
13
|
self._model: typing.Type[_T] = model
|
|
14
14
|
|
|
15
|
-
def
|
|
15
|
+
def __call__(self, data: typing.AnyStr | None) -> _T | None:
|
|
16
16
|
if data is None:
|
|
17
17
|
return
|
|
18
18
|
|
|
@@ -24,14 +24,6 @@ class OutboxedEvent(pydantic.BaseModel, frozen=True):
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class OutboxedEventRepository(abc.ABC, typing.Generic[Session]):
|
|
27
|
-
@abc.abstractmethod
|
|
28
|
-
async def __aenter__(self) -> Session:
|
|
29
|
-
"""start transaction"""
|
|
30
|
-
|
|
31
|
-
@abc.abstractmethod
|
|
32
|
-
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
|
33
|
-
"""end transaction"""
|
|
34
|
-
|
|
35
27
|
@abc.abstractmethod
|
|
36
28
|
def add(
|
|
37
29
|
self,
|
|
@@ -57,11 +49,3 @@ class OutboxedEventRepository(abc.ABC, typing.Generic[Session]):
|
|
|
57
49
|
new_status: EventStatus,
|
|
58
50
|
):
|
|
59
51
|
"""Update the event status"""
|
|
60
|
-
|
|
61
|
-
@abc.abstractmethod
|
|
62
|
-
async def commit(self, session: Session):
|
|
63
|
-
"""Commit the changes to the repository."""
|
|
64
|
-
|
|
65
|
-
@abc.abstractmethod
|
|
66
|
-
async def rollback(self, session: Session):
|
|
67
|
-
"""Rollback the changes to the repository."""
|
|
@@ -155,10 +155,8 @@ class SqlAlchemyOutboxedEventRepository(
|
|
|
155
155
|
):
|
|
156
156
|
def __init__(
|
|
157
157
|
self,
|
|
158
|
-
session_factory: typing.Callable[[], sql_session.AsyncSession],
|
|
159
158
|
compressor: compressors.Compressor | None = None,
|
|
160
159
|
):
|
|
161
|
-
self._session_factory = session_factory
|
|
162
160
|
self._compressor = compressor
|
|
163
161
|
|
|
164
162
|
def add(
|
|
@@ -239,19 +237,3 @@ class SqlAlchemyOutboxedEventRepository(
|
|
|
239
237
|
await session.execute(
|
|
240
238
|
statement=OutboxModel.update_status_query(outboxed_event_id, new_status),
|
|
241
239
|
)
|
|
242
|
-
|
|
243
|
-
async def commit(self, session: sql_session.AsyncSession):
|
|
244
|
-
await session.commit()
|
|
245
|
-
|
|
246
|
-
async def rollback(self, session: sql_session.AsyncSession):
|
|
247
|
-
await session.rollback()
|
|
248
|
-
|
|
249
|
-
async def __aenter__(self):
|
|
250
|
-
self.session = self._session_factory()
|
|
251
|
-
return self.session
|
|
252
|
-
|
|
253
|
-
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
|
254
|
-
if self.session:
|
|
255
|
-
await self.session.rollback()
|
|
256
|
-
await self.session.close()
|
|
257
|
-
self.session = None
|
|
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
|