Skip to content
6 changes: 4 additions & 2 deletions examples/workflow/simple_aio.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2023 The Dapr Authors
# Copyright 2025 The Dapr Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -77,11 +77,13 @@ def hello_world_wf(ctx: wf.DaprWorkflowContext, wf_input):
async def hello_act(ctx: wf.WorkflowActivityContext, wf_input):
global counter
counter += wf_input
await asyncio.sleep(0.1) # simulates async work.
print(f'New counter value is: {counter}!', flush=True)


# an activity can also be left synchronous.
@wfr.activity(name='hello_retryable_act')
async def hello_retryable_act(ctx: wf.WorkflowActivityContext):
def hello_retryable_act(ctx: wf.WorkflowActivityContext):
global retry_count
if (retry_count % 2) == 0:
print(f'Retry count value is: {retry_count}!', flush=True)
Expand Down
13 changes: 13 additions & 0 deletions ext/dapr-ext-workflow/dapr/ext/workflow/aio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# -*- coding: utf-8 -*-

"""
Copyright 2025 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

from .dapr_workflow_client import DaprWorkflowClient
from .workflow_runtime import WorkflowRuntime

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

"""
Copyright 2023 The Dapr Authors
Copyright 2025 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
4 changes: 2 additions & 2 deletions ext/dapr-ext-workflow/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ python_requires = >=3.9
packages = find_namespace:
include_package_data = True
install_requires =
dapr >= 1.16.0.dev
durabletask-dapr >= 0.2.0a12
dapr >= 1.16.1rc1
durabletask-dapr >= 0.2.0a13
grpcio >= 1.62

[options.packages.find]
Expand Down
2 changes: 1 addition & 1 deletion ext/dapr-ext-workflow/tests/aio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

"""
Copyright 2023 The Dapr Authors
Copyright 2025 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion ext/dapr-ext-workflow/tests/aio/test_workflow_runtime.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

"""
Copyright 2023 The Dapr Authors
Copyright 2025 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
Loading