python-cqrs 4.6.2__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.
Files changed (84) hide show
  1. {python_cqrs-4.6.2/src/python_cqrs.egg-info → python_cqrs-4.6.4}/PKG-INFO +12 -7
  2. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/README.md +8 -5
  3. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/pyproject.toml +4 -2
  4. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/events/event.py +3 -2
  5. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/message_brokers/protocol.py +2 -1
  6. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/storage/sqlalchemy.py +16 -3
  7. {python_cqrs-4.6.2 → python_cqrs-4.6.4/src/python_cqrs.egg-info}/PKG-INFO +12 -7
  8. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/python_cqrs.egg-info/requires.txt +3 -1
  9. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/LICENSE +0 -0
  10. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/setup.cfg +0 -0
  11. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/__init__.py +0 -0
  12. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/adapters/__init__.py +0 -0
  13. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/adapters/amqp.py +0 -0
  14. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/adapters/circuit_breaker.py +0 -0
  15. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/adapters/kafka.py +0 -0
  16. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/adapters/protocol.py +0 -0
  17. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/compressors/__init__.py +0 -0
  18. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/compressors/protocol.py +0 -0
  19. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/compressors/zlib.py +0 -0
  20. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/container/__init__.py +0 -0
  21. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/container/dependency_injector.py +0 -0
  22. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/container/di.py +0 -0
  23. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/container/protocol.py +0 -0
  24. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/deserializers/__init__.py +0 -0
  25. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/deserializers/exceptions.py +0 -0
  26. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/deserializers/json.py +0 -0
  27. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/dispatcher/__init__.py +0 -0
  28. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/dispatcher/event.py +0 -0
  29. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/dispatcher/exceptions.py +0 -0
  30. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/dispatcher/models.py +0 -0
  31. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/dispatcher/request.py +0 -0
  32. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/dispatcher/saga.py +0 -0
  33. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/dispatcher/streaming.py +0 -0
  34. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/events/__init__.py +0 -0
  35. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/events/bootstrap.py +0 -0
  36. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/events/event_emitter.py +0 -0
  37. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/events/event_handler.py +0 -0
  38. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/events/event_processor.py +0 -0
  39. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/events/map.py +0 -0
  40. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/mediator.py +0 -0
  41. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/message_brokers/__init__.py +0 -0
  42. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/message_brokers/amqp.py +0 -0
  43. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/message_brokers/devnull.py +0 -0
  44. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/message_brokers/kafka.py +0 -0
  45. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/middlewares/__init__.py +0 -0
  46. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/middlewares/base.py +0 -0
  47. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/middlewares/logging.py +0 -0
  48. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/outbox/__init__.py +0 -0
  49. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/outbox/map.py +0 -0
  50. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/outbox/mock.py +0 -0
  51. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/outbox/repository.py +0 -0
  52. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/outbox/sqlalchemy.py +0 -0
  53. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/producer.py +0 -0
  54. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/requests/__init__.py +0 -0
  55. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/requests/bootstrap.py +0 -0
  56. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/requests/cor_request_handler.py +0 -0
  57. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/requests/map.py +0 -0
  58. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/requests/mermaid.py +0 -0
  59. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/requests/request.py +0 -0
  60. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/requests/request_handler.py +0 -0
  61. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/response.py +0 -0
  62. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/__init__.py +0 -0
  63. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/bootstrap.py +0 -0
  64. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/circuit_breaker.py +0 -0
  65. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/compensation.py +0 -0
  66. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/execution.py +0 -0
  67. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/fallback.py +0 -0
  68. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/mermaid.py +0 -0
  69. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/models.py +0 -0
  70. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/recovery.py +0 -0
  71. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/saga.py +0 -0
  72. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/step.py +0 -0
  73. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/storage/__init__.py +0 -0
  74. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/storage/enums.py +0 -0
  75. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/storage/memory.py +0 -0
  76. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/storage/models.py +0 -0
  77. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/storage/protocol.py +0 -0
  78. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/saga/validation.py +0 -0
  79. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/serializers/__init__.py +0 -0
  80. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/serializers/default.py +0 -0
  81. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/cqrs/types.py +0 -0
  82. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/python_cqrs.egg-info/SOURCES.txt +0 -0
  83. {python_cqrs-4.6.2 → python_cqrs-4.6.4}/src/python_cqrs.egg-info/dependency_links.txt +0 -0
  84. {python_cqrs-4.6.2 → 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.2
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>
@@ -16,9 +16,10 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Requires-Python: >=3.10
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
+ Requires-Dist: dataclass-wizard==0.*
19
20
  Requires-Dist: di[anyio]==0.79.2
20
21
  Requires-Dist: dependency-injector>=4.48.2
21
- Requires-Dist: orjson==3.9.15
22
+ Requires-Dist: orjson==3.*
22
23
  Requires-Dist: pydantic==2.*
23
24
  Requires-Dist: python-dotenv==1.0.1
24
25
  Requires-Dist: retry-async==0.1.4
@@ -33,6 +34,7 @@ Requires-Dist: pyright==1.1.408; extra == "dev"
33
34
  Requires-Dist: ruff==0.6.2; extra == "dev"
34
35
  Requires-Dist: vermin>=1.6.0; extra == "dev"
35
36
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
37
+ Requires-Dist: pytest-codspeed==4.2.0; extra == "dev"
36
38
  Requires-Dist: aio-pika==9.3.0; extra == "dev"
37
39
  Requires-Dist: aiokafka==0.10.0; extra == "dev"
38
40
  Requires-Dist: requests==2.*; extra == "dev"
@@ -83,6 +85,9 @@ Dynamic: license-file
83
85
  <a href="https://codecov.io/gh/vadikko2/python-cqrs">
84
86
  <img src="https://img.shields.io/codecov/c/github/vadikko2/python-cqrs?logo=codecov&logoColor=white" alt="Coverage">
85
87
  </a>
88
+ <a href="https://codspeed.io/vadikko2/python-cqrs?utm_source=badge">
89
+ <img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed">
90
+ </a>
86
91
  <a href="https://mkdocs.python-cqrs.dev/">
87
92
  <img src="https://img.shields.io/badge/docs-mkdocs-blue?logo=readthedocs" alt="Documentation">
88
93
  </a>
@@ -987,16 +992,16 @@ async def process_files_stream(
987
992
  mediator: cqrs.StreamingRequestMediator = fastapi.Depends(streaming_mediator_factory),
988
993
  ) -> fastapi.responses.StreamingResponse:
989
994
  async def generate_sse():
990
- yield f"data: {json.dumps({'type': 'start', 'message': 'Processing...'})}\n\n"
995
+ yield f"data: {json.dumps({'type': 'start', 'message': 'Processing...'})}\\n\\n"
991
996
 
992
997
  async for result in mediator.stream(command):
993
998
  sse_data = {
994
999
  "type": "progress",
995
1000
  "data": result.to_dict(),
996
1001
  }
997
- yield f"data: {json.dumps(sse_data)}\n\n"
1002
+ yield f"data: {json.dumps(sse_data)}\\n\\n"
998
1003
 
999
- yield f"data: {json.dumps({'type': 'complete'})}\n\n"
1004
+ yield f"data: {json.dumps({'type': 'complete'})}\\n\\n"
1000
1005
 
1001
1006
  return fastapi.responses.StreamingResponse(
1002
1007
  generate_sse(),
@@ -1009,8 +1014,8 @@ the [documentation](https://github.com/vadikko2/cqrs/blob/master/examples/fastap
1009
1014
 
1010
1015
  ## Protobuf messaging
1011
1016
 
1012
- The `python-cqrs` package supports integration with [protobuf](https://developers.google.com/protocol-buffers/).\
1013
- Protocol buffers are Googles language-neutral, platform-neutral, extensible mechanism for serializing structured data –
1017
+ The `python-cqrs` package supports integration with [protobuf](https://developers.google.com/protocol-buffers/).\\
1018
+ Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data –
1014
1019
  think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use
1015
1020
  special generated source code to easily write and read your structured data to and from a variety of data streams and
1016
1021
  using a variety of languages.
@@ -24,6 +24,9 @@
24
24
  <a href="https://codecov.io/gh/vadikko2/python-cqrs">
25
25
  <img src="https://img.shields.io/codecov/c/github/vadikko2/python-cqrs?logo=codecov&logoColor=white" alt="Coverage">
26
26
  </a>
27
+ <a href="https://codspeed.io/vadikko2/python-cqrs?utm_source=badge">
28
+ <img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed">
29
+ </a>
27
30
  <a href="https://mkdocs.python-cqrs.dev/">
28
31
  <img src="https://img.shields.io/badge/docs-mkdocs-blue?logo=readthedocs" alt="Documentation">
29
32
  </a>
@@ -928,16 +931,16 @@ async def process_files_stream(
928
931
  mediator: cqrs.StreamingRequestMediator = fastapi.Depends(streaming_mediator_factory),
929
932
  ) -> fastapi.responses.StreamingResponse:
930
933
  async def generate_sse():
931
- yield f"data: {json.dumps({'type': 'start', 'message': 'Processing...'})}\n\n"
934
+ yield f"data: {json.dumps({'type': 'start', 'message': 'Processing...'})}\\n\\n"
932
935
 
933
936
  async for result in mediator.stream(command):
934
937
  sse_data = {
935
938
  "type": "progress",
936
939
  "data": result.to_dict(),
937
940
  }
938
- yield f"data: {json.dumps(sse_data)}\n\n"
941
+ yield f"data: {json.dumps(sse_data)}\\n\\n"
939
942
 
940
- yield f"data: {json.dumps({'type': 'complete'})}\n\n"
943
+ yield f"data: {json.dumps({'type': 'complete'})}\\n\\n"
941
944
 
942
945
  return fastapi.responses.StreamingResponse(
943
946
  generate_sse(),
@@ -950,8 +953,8 @@ the [documentation](https://github.com/vadikko2/cqrs/blob/master/examples/fastap
950
953
 
951
954
  ## Protobuf messaging
952
955
 
953
- The `python-cqrs` package supports integration with [protobuf](https://developers.google.com/protocol-buffers/).\
954
- Protocol buffers are Googles language-neutral, platform-neutral, extensible mechanism for serializing structured data –
956
+ The `python-cqrs` package supports integration with [protobuf](https://developers.google.com/protocol-buffers/).\\
957
+ Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data –
955
958
  think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use
956
959
  special generated source code to easily write and read your structured data to and from a variety of data streams and
957
960
  using a variety of languages.
@@ -16,9 +16,10 @@ classifiers = [
16
16
  "Programming Language :: Python :: 3.12"
17
17
  ]
18
18
  dependencies = [
19
+ "dataclass-wizard==0.*",
19
20
  "di[anyio]==0.79.2",
20
21
  "dependency-injector>=4.48.2",
21
- "orjson==3.9.15",
22
+ "orjson==3.*",
22
23
  "pydantic==2.*",
23
24
  "python-dotenv==1.0.1",
24
25
  "retry-async==0.1.4",
@@ -30,7 +31,7 @@ maintainers = [{name = "Vadim Kozyrevskiy", email = "vadikko2@mail.ru"}]
30
31
  name = "python-cqrs"
31
32
  readme = "README.md"
32
33
  requires-python = ">=3.10"
33
- version = "4.6.2"
34
+ version = "4.6.4"
34
35
 
35
36
  [project.optional-dependencies]
36
37
  aiobreaker = ["aiobreaker>=0.3.0"]
@@ -42,6 +43,7 @@ dev = [
42
43
  "ruff==0.6.2",
43
44
  "vermin>=1.6.0",
44
45
  "pytest-cov>=4.0.0",
46
+ "pytest-codspeed==4.2.0",
45
47
  # Tests
46
48
  "aio-pika==9.3.0", # from rabbit
47
49
  "aiokafka==0.10.0", # from kafka
@@ -1,5 +1,6 @@
1
1
  import abc
2
2
  import dataclasses
3
+ from dataclass_wizard import fromdict, asdict
3
4
  import datetime
4
5
  import os
5
6
  import typing
@@ -92,7 +93,7 @@ class DCEvent(IEvent):
92
93
  Returns:
93
94
  A new instance of the event class.
94
95
  """
95
- return cls(**kwargs)
96
+ return fromdict(cls, kwargs)
96
97
 
97
98
  def to_dict(self) -> dict:
98
99
  """
@@ -101,7 +102,7 @@ class DCEvent(IEvent):
101
102
  Returns:
102
103
  A dictionary containing all fields of the dataclass instance.
103
104
  """
104
- return dataclasses.asdict(self)
105
+ return asdict(self)
105
106
 
106
107
 
107
108
  class PydanticEvent(pydantic.BaseModel, IEvent, frozen=True):
@@ -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 dataclasses.asdict(self)
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__ = DEFAULT_SAGA_EXECUTION_TABLE_NAME
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__ = DEFAULT_SAGA_LOG_TABLE_NAME
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"{DEFAULT_SAGA_EXECUTION_TABLE_NAME}.id"),
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.2
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>
@@ -16,9 +16,10 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Requires-Python: >=3.10
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
+ Requires-Dist: dataclass-wizard==0.*
19
20
  Requires-Dist: di[anyio]==0.79.2
20
21
  Requires-Dist: dependency-injector>=4.48.2
21
- Requires-Dist: orjson==3.9.15
22
+ Requires-Dist: orjson==3.*
22
23
  Requires-Dist: pydantic==2.*
23
24
  Requires-Dist: python-dotenv==1.0.1
24
25
  Requires-Dist: retry-async==0.1.4
@@ -33,6 +34,7 @@ Requires-Dist: pyright==1.1.408; extra == "dev"
33
34
  Requires-Dist: ruff==0.6.2; extra == "dev"
34
35
  Requires-Dist: vermin>=1.6.0; extra == "dev"
35
36
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
37
+ Requires-Dist: pytest-codspeed==4.2.0; extra == "dev"
36
38
  Requires-Dist: aio-pika==9.3.0; extra == "dev"
37
39
  Requires-Dist: aiokafka==0.10.0; extra == "dev"
38
40
  Requires-Dist: requests==2.*; extra == "dev"
@@ -83,6 +85,9 @@ Dynamic: license-file
83
85
  <a href="https://codecov.io/gh/vadikko2/python-cqrs">
84
86
  <img src="https://img.shields.io/codecov/c/github/vadikko2/python-cqrs?logo=codecov&logoColor=white" alt="Coverage">
85
87
  </a>
88
+ <a href="https://codspeed.io/vadikko2/python-cqrs?utm_source=badge">
89
+ <img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed">
90
+ </a>
86
91
  <a href="https://mkdocs.python-cqrs.dev/">
87
92
  <img src="https://img.shields.io/badge/docs-mkdocs-blue?logo=readthedocs" alt="Documentation">
88
93
  </a>
@@ -987,16 +992,16 @@ async def process_files_stream(
987
992
  mediator: cqrs.StreamingRequestMediator = fastapi.Depends(streaming_mediator_factory),
988
993
  ) -> fastapi.responses.StreamingResponse:
989
994
  async def generate_sse():
990
- yield f"data: {json.dumps({'type': 'start', 'message': 'Processing...'})}\n\n"
995
+ yield f"data: {json.dumps({'type': 'start', 'message': 'Processing...'})}\\n\\n"
991
996
 
992
997
  async for result in mediator.stream(command):
993
998
  sse_data = {
994
999
  "type": "progress",
995
1000
  "data": result.to_dict(),
996
1001
  }
997
- yield f"data: {json.dumps(sse_data)}\n\n"
1002
+ yield f"data: {json.dumps(sse_data)}\\n\\n"
998
1003
 
999
- yield f"data: {json.dumps({'type': 'complete'})}\n\n"
1004
+ yield f"data: {json.dumps({'type': 'complete'})}\\n\\n"
1000
1005
 
1001
1006
  return fastapi.responses.StreamingResponse(
1002
1007
  generate_sse(),
@@ -1009,8 +1014,8 @@ the [documentation](https://github.com/vadikko2/cqrs/blob/master/examples/fastap
1009
1014
 
1010
1015
  ## Protobuf messaging
1011
1016
 
1012
- The `python-cqrs` package supports integration with [protobuf](https://developers.google.com/protocol-buffers/).\
1013
- Protocol buffers are Googles language-neutral, platform-neutral, extensible mechanism for serializing structured data –
1017
+ The `python-cqrs` package supports integration with [protobuf](https://developers.google.com/protocol-buffers/).\\
1018
+ Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data –
1014
1019
  think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use
1015
1020
  special generated source code to easily write and read your structured data to and from a variety of data streams and
1016
1021
  using a variety of languages.
@@ -1,6 +1,7 @@
1
+ dataclass-wizard==0.*
1
2
  di[anyio]==0.79.2
2
3
  dependency-injector>=4.48.2
3
- orjson==3.9.15
4
+ orjson==3.*
4
5
  pydantic==2.*
5
6
  python-dotenv==1.0.1
6
7
  retry-async==0.1.4
@@ -17,6 +18,7 @@ pyright==1.1.408
17
18
  ruff==0.6.2
18
19
  vermin>=1.6.0
19
20
  pytest-cov>=4.0.0
21
+ pytest-codspeed==4.2.0
20
22
  aio-pika==9.3.0
21
23
  aiokafka==0.10.0
22
24
  requests==2.*
File without changes
File without changes