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 +39 -5
- edda/app.py +383 -223
- edda/channels.py +992 -0
- edda/compensation.py +22 -22
- edda/context.py +77 -51
- edda/integrations/opentelemetry/hooks.py +7 -2
- edda/locking.py +130 -67
- edda/replay.py +312 -82
- edda/storage/models.py +165 -24
- edda/storage/protocol.py +557 -118
- edda/storage/sqlalchemy_storage.py +1968 -314
- edda/viewer_ui/app.py +6 -1
- edda/viewer_ui/data_service.py +19 -22
- edda/workflow.py +43 -0
- {edda_framework-0.7.0.dist-info → edda_framework-0.8.0.dist-info}/METADATA +165 -9
- {edda_framework-0.7.0.dist-info → edda_framework-0.8.0.dist-info}/RECORD +19 -19
- edda/events.py +0 -505
- {edda_framework-0.7.0.dist-info → edda_framework-0.8.0.dist-info}/WHEEL +0 -0
- {edda_framework-0.7.0.dist-info → edda_framework-0.8.0.dist-info}/entry_points.txt +0 -0
- {edda_framework-0.7.0.dist-info → edda_framework-0.8.0.dist-info}/licenses/LICENSE +0 -0
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,
|
|
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",
|
|
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
|
]
|