Child Workflows - Python SDK | Temporal Platform Documentation
Child Workflows - Python SDK | Temporal Platform Documentation
2025, 17:09
Develop
Start a Child
Workflow
Execution
How to start a Child Workflow
Execution using the Temporal
Python SDK.
https://docs.temporal.io/develop/python/child-workflows Page 1 of 6
Child Workflows - Python SDK | Temporal Platform Documentation 10.04.2025, 17:09
https://docs.temporal.io/develop/python/child-workflows Page 2 of 6
Child Workflows - Python SDK | Temporal Platform Documentation 10.04.2025, 17:09
NOTE
execute_child_workflow()
is a helper function for
start_child_workflow()
plus await handle .
# ...
@workflow.defn
class ComposeGreetingWorkflow
@workflow.run
async def run(self, input
ComposeGreetingInput) -> str
return f"
{input.greeting}, {input.name
@workflow.defn
class GreetingWorkflow:
@workflow.run
async def run(self, name
str) -> str:
return await
workflow.execute_child_workflow
ComposeGreetingWorkflow.run,
ComposeGreetingInput("Hello"
name),
id="hello-child-
https://docs.temporal.io/develop/python/child-workflows Page 3 of 6
Child Workflows - Python SDK | Temporal Platform Documentation 10.04.2025, 17:09
workflow-workflow-child-id",
# ...
)
https://docs.temporal.io/develop/python/child-workflows Page 4 of 6
Child Workflows - Python SDK | Temporal Platform Documentation 10.04.2025, 17:09
# ...
# ...
@workflow.defn
class ComposeGreetingWorkflow
@workflow.run
async def run(self, input
ComposeGreetingInput) -> str
return f"{input.greeting
{input.name}!"
@workflow.defn
class GreetingWorkflow:
@workflow.run
async def run(self, name
return await
workflow.execute_child_workflow
ComposeGreetingWorkflow
ComposeGreetingInput
name),
id="hello-child-workflow-workfl
child-id",
parent_close_policy=ParentClosePolicy
)
Tags: Workflows
Temporal SDKs
https://docs.temporal.io/develop/python/child-workflows Page 5 of 6
Child Workflows - Python SDK | Temporal Platform Documentation 10.04.2025, 17:09
Help us make
Temporal
better.
Contribute to
our
documentation.
https://docs.temporal.io/develop/python/child-workflows Page 6 of 6