Skip to content

Commit 869fd0d

Browse files
authored
chore: rename @durable_handler to @durable_execution (#74)
1 parent e006e9c commit 869fd0d

20 files changed

+58
-55
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ from durable_executions_python_language_sdk.context import (
3737
durable_step,
3838
durable_with_child_context,
3939
)
40-
from durable_executions_python_language_sdk.execution import durable_handler
40+
from durable_executions_python_language_sdk.execution import durable_execution
4141

4242
@durable_step
4343
def one(a: int, b: int) -> str:
@@ -61,7 +61,7 @@ def two(ctx: DurableContext, a: int, b: int) -> str:
6161
def three(a: int, b: int) -> str:
6262
return f"{a} {b}"
6363

64-
@durable_handler
64+
@durable_execution
6565
def function_under_test(event: Any, context: DurableContext) -> list[str]:
6666
results: list[str] = []
6767

examples/src/callback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from aws_durable_execution_sdk_python.config import CallbackConfig
44
from aws_durable_execution_sdk_python.context import DurableContext
5-
from aws_durable_execution_sdk_python.execution import durable_handler
5+
from aws_durable_execution_sdk_python.execution import durable_execution
66

77

88
if TYPE_CHECKING:
99
from aws_durable_execution_sdk_python.types import Callback
1010

1111

12-
@durable_handler
12+
@durable_execution
1313
def handler(_event: Any, context: DurableContext) -> str:
1414
callback_config = CallbackConfig(timeout_seconds=120, heartbeat_timeout_seconds=60)
1515

examples/src/callback_with_timeout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from aws_durable_execution_sdk_python.config import CallbackConfig
44
from aws_durable_execution_sdk_python.context import DurableContext
5-
from aws_durable_execution_sdk_python.execution import durable_handler
5+
from aws_durable_execution_sdk_python.execution import durable_execution
66

77

88
if TYPE_CHECKING:
99
from aws_durable_execution_sdk_python.types import Callback
1010

1111

12-
@durable_handler
12+
@durable_execution
1313
def handler(_event: Any, context: DurableContext) -> str:
1414
# Callback with custom timeout configuration
1515
config = CallbackConfig(timeout_seconds=60, heartbeat_timeout_seconds=30)

examples/src/hello_world.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import Any
22

33
from aws_durable_execution_sdk_python.context import DurableContext
4-
from aws_durable_execution_sdk_python.execution import durable_handler
4+
from aws_durable_execution_sdk_python.execution import durable_execution
55

66

7-
@durable_handler
7+
@durable_execution
88
def handler(_event: Any, _context: DurableContext) -> str:
99
"""Simple hello world durable function."""
1010
return "Hello World!"

examples/src/map_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
from typing import Any
22

33
from aws_durable_execution_sdk_python.context import DurableContext
4-
from aws_durable_execution_sdk_python.execution import durable_handler
4+
from aws_durable_execution_sdk_python.execution import durable_execution
55

66

77
def square(x: int) -> int:
88
return x * x
99

1010

11-
@durable_handler
11+
@durable_execution
1212
def handler(_event: Any, context: DurableContext) -> str:
1313
# Process a list of items using map-like operations
1414
items = [1, 2, 3, 4, 5]

examples/src/parallel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import Any
22

33
from aws_durable_execution_sdk_python.context import DurableContext
4-
from aws_durable_execution_sdk_python.execution import durable_handler
4+
from aws_durable_execution_sdk_python.execution import durable_execution
55

66

7-
@durable_handler
7+
@durable_execution
88
def handler(_event: Any, context: DurableContext) -> str:
99
# Execute multiple operations in parallel
1010
task1 = context.step(lambda _: "Task 1 complete", name="task1")

examples/src/parallel_first_successful.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
from aws_durable_execution_sdk_python.config import CompletionConfig, ParallelConfig
44
from aws_durable_execution_sdk_python.context import DurableContext
5-
from aws_durable_execution_sdk_python.execution import durable_handler
5+
from aws_durable_execution_sdk_python.execution import durable_execution
66

77

8-
@durable_handler
8+
@durable_execution
99
def handler(_event: Any, context: DurableContext) -> str:
1010
# Parallel execution with first_successful completion strategy
1111
config = ParallelConfig(completion_config=CompletionConfig.first_successful())

examples/src/run_in_child_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
DurableContext,
55
durable_with_child_context,
66
)
7-
from aws_durable_execution_sdk_python.execution import durable_handler
7+
from aws_durable_execution_sdk_python.execution import durable_execution
88

99

1010
def multiply_by_two(value: int) -> int:
@@ -16,7 +16,7 @@ def child_operation(ctx: DurableContext, value: int) -> int:
1616
return ctx.step(lambda _: multiply_by_two(value), name="multiply")
1717

1818

19-
@durable_handler
19+
@durable_execution
2020
def handler(_event: Any, context: DurableContext) -> str:
2121
result = context.run_in_child_context(child_operation(5))
2222
return f"Child context result: {result}"

examples/src/step.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
StepContext,
66
durable_step,
77
)
8-
from aws_durable_execution_sdk_python.execution import durable_handler
8+
from aws_durable_execution_sdk_python.execution import durable_execution
99

1010

1111
@durable_step
1212
def add_numbers(_step_context: StepContext, a: int, b: int) -> int:
1313
return a + b
1414

1515

16-
@durable_handler
16+
@durable_execution
1717
def handler(_event: Any, context: DurableContext) -> int:
1818
result: int = context.step(add_numbers(5, 3))
1919
return result

examples/src/step_no_name.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import Any
22

33
from aws_durable_execution_sdk_python.context import DurableContext
4-
from aws_durable_execution_sdk_python.execution import durable_handler
4+
from aws_durable_execution_sdk_python.execution import durable_execution
55

66

7-
@durable_handler
7+
@durable_execution
88
def handler(_event: Any, context: DurableContext) -> str:
99
# Step without explicit name - should use function name
1010
result = context.step(lambda _: "Step without name")

0 commit comments

Comments
 (0)