python-cq 0.24.0__py3-none-any.whl → 0.25.0__py3-none-any.whl

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.
cq/__init__.py CHANGED
@@ -16,6 +16,7 @@ from ._core.routing.command_pipeline import ContextCommandPipeline
16
16
  from ._core.routing.di import DIAdapter
17
17
  from ._core.routing.dispatchers.abc import Dispatcher
18
18
  from ._core.routing.dispatchers.bus import Bus
19
+ from ._core.routing.dispatchers.functions import dispatch_sequentially
19
20
  from ._core.routing.dispatchers.pipe import ContextPipeline, Pipe
20
21
  from ._core.routing.router import Router
21
22
 
@@ -46,6 +47,7 @@ __all__ = (
46
47
  "Router",
47
48
  "__router__",
48
49
  "command_handler",
50
+ "dispatch_sequentially",
49
51
  "event_handler",
50
52
  "new_command_bus",
51
53
  "new_event_bus",
@@ -0,0 +1,11 @@
1
+ from typing import Any
2
+
3
+ from cq._core.routing.dispatchers.abc import Dispatcher
4
+
5
+
6
+ async def dispatch_sequentially[T, *Ts](
7
+ dispatcher: Dispatcher[T, Any],
8
+ /,
9
+ *messages: T,
10
+ ) -> tuple[*Ts]:
11
+ return tuple([await dispatcher.dispatch(message) for message in messages])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: python-cq
3
- Version: 0.24.0
3
+ Version: 0.25.0
4
4
  Summary: CQRS library for async Python projects.
5
5
  Project-URL: Documentation, https://python-cq.remimd.dev
6
6
  Project-URL: Repository, https://github.com/100nm/python-cq
@@ -1,4 +1,4 @@
1
- cq/__init__.py,sha256=0HISWerIbqoHHk_ZTH43RBRN2fwt1X4KXPBuIj0WF60,1911
1
+ cq/__init__.py,sha256=cIQ_uYKh4vIM_hRt2TCIMpyA35hybQfXqX52QwFpeZk,2011
2
2
  cq/exceptions.py,sha256=lmIpWDbPPwdS9bAAKxUvampA1KKmB706wWaB2mKZyPc,111
3
3
  cq/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  cq/_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,6 +20,7 @@ cq/_core/routing/router.py,sha256=s6xkFeBosOOTjh5CTwBF64uYu23TSzFRK67xlDjJvPI,26
20
20
  cq/_core/routing/dispatchers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  cq/_core/routing/dispatchers/abc.py,sha256=PKHHrs4lmK5nDAOLI97X_hueHnmarZKFXXX51MCpJDw,1268
22
22
  cq/_core/routing/dispatchers/bus.py,sha256=ZQ1nvSuhLgEvqGMPIgKgWdkKueVzwrTDWeK07TfE57g,3429
23
+ cq/_core/routing/dispatchers/functions.py,sha256=mUYcGDrHkZyX189xkMaA_x0ClWFb0_WjH3jnBHan838,280
23
24
  cq/_core/routing/dispatchers/lazy.py,sha256=ep4vC7lB0_iRZmoC7W5v4nQejEQ3z9NsO1Q_QEYpI_8,731
24
25
  cq/_core/routing/dispatchers/pipe.py,sha256=QmK8m-uerewJVY82Ikf11ixUn-gPAzG23doakIglxyc,9731
25
26
  cq/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -28,7 +29,7 @@ cq/middlewares/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
29
  cq/middlewares/contextlib.py,sha256=_kwbXteGADGuzD-o2pPoPWOeTKiXcPCNuDmpG-f-YnY,875
29
30
  cq/middlewares/exc.py,sha256=ecAMoksj6B4osySSZ9g_cBR35_tiABQdpII-Drxkz44,1604
30
31
  cq/middlewares/retry.py,sha256=L6X_Wa2TZ0IYNXmi8oexTXQyM_lkjJt5Ew4D-2VzwBY,957
31
- python_cq-0.24.0.dist-info/METADATA,sha256=6ENGI4KWPmBJUKAlUXI45DcYHVIWA3qGogeHqgWY0MQ,4562
32
- python_cq-0.24.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
33
- python_cq-0.24.0.dist-info/licenses/LICENSE,sha256=oC77BOa9kaaQni5rW-Z-ytz3E5h4EVg248BHg9UFgyg,1063
34
- python_cq-0.24.0.dist-info/RECORD,,
32
+ python_cq-0.25.0.dist-info/METADATA,sha256=E360s2Dd_Bgp3ApM1TdTLcxS0hM8GWtbsIeE5vLRrVk,4562
33
+ python_cq-0.25.0.dist-info/WHEEL,sha256=THafob7ofN-NsuMN7Mg4qZyHaQI7KkD-QlcQatYhXPo,87
34
+ python_cq-0.25.0.dist-info/licenses/LICENSE,sha256=oC77BOa9kaaQni5rW-Z-ytz3E5h4EVg248BHg9UFgyg,1063
35
+ python_cq-0.25.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.32.0
2
+ Generator: hatchling 1.32.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any