edda-framework 0.7.0__py3-none-any.whl → 0.8.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.
edda/__init__.py CHANGED
@@ -5,7 +5,7 @@ Example:
5
5
  >>> import asyncio
6
6
  >>> import sys
7
7
  >>> import uvloop
8
- >>> from edda import EddaApp, workflow, activity, wait_event, wait_timer
8
+ >>> from edda import EddaApp, workflow, activity, wait_event, sleep
9
9
  >>>
10
10
  >>> # Python 3.12+ uses asyncio.set_event_loop_policy()
11
11
  >>> if sys.version_info >= (3, 12):
@@ -22,9 +22,25 @@ Example:
22
22
 
23
23
  from edda.activity import activity
24
24
  from edda.app import EddaApp
25
+ from edda.channels import (
26
+ # Channel-based messaging (new unified API)
27
+ ChannelMessage,
28
+ EventTimeoutError,
29
+ ReceivedEvent,
30
+ publish,
31
+ receive,
32
+ send_event,
33
+ send_to,
34
+ sleep,
35
+ sleep_until,
36
+ subscribe,
37
+ unsubscribe,
38
+ wait_event,
39
+ wait_timer,
40
+ wait_until,
41
+ )
25
42
  from edda.compensation import compensation, on_failure, register_compensation
26
43
  from edda.context import WorkflowContext
27
- from edda.events import ReceivedEvent, send_event, wait_event, wait_timer, wait_until
28
44
  from edda.exceptions import RetryExhaustedError, TerminalError
29
45
  from edda.hooks import HooksBase, WorkflowHooks
30
46
  from edda.outbox import OutboxRelayer, send_event_transactional
@@ -35,24 +51,42 @@ from edda.wsgi import create_wsgi_app
35
51
  __version__ = "0.1.0"
36
52
 
37
53
  __all__ = [
54
+ # Core
38
55
  "EddaApp",
39
56
  "workflow",
40
57
  "activity",
41
58
  "WorkflowContext",
59
+ # Channel-based Messaging (Erlang mailbox-style)
60
+ "ChannelMessage",
61
+ "subscribe",
62
+ "unsubscribe",
63
+ "receive",
64
+ "publish",
65
+ "send_to",
66
+ # CloudEvents
42
67
  "ReceivedEvent",
43
68
  "wait_event",
44
- "wait_timer",
45
- "wait_until",
46
69
  "send_event",
70
+ "EventTimeoutError",
71
+ # Timer Functions
72
+ "sleep",
73
+ "sleep_until",
74
+ "wait_timer", # Backward compatibility alias for sleep
75
+ "wait_until", # Backward compatibility alias for sleep_until
76
+ # Compensation
47
77
  "compensation",
48
78
  "register_compensation",
49
- "on_failure", # Already exported, just confirming it's in __all__
79
+ "on_failure",
80
+ # Outbox
50
81
  "OutboxRelayer",
51
82
  "send_event_transactional",
83
+ # Hooks
52
84
  "WorkflowHooks",
53
85
  "HooksBase",
86
+ # Retry
54
87
  "RetryPolicy",
55
88
  "RetryExhaustedError",
56
89
  "TerminalError",
90
+ # WSGI
57
91
  "create_wsgi_app",
58
92
  ]