Skip to main content

How to create a Temporal Client in Python

Use connect() method on the Client class to create and connect to a Temporal Server at a given address and Namespace.

Specify the target_host parameter as a string.

Connect to Docker

await Client.connect("127.0.0.1:7233", namespace="your-custom-namespace")

Connect to your Cluster

await Client.connect(
"web.<Namespace_ID>.tmprl.cloud", namespace="your-custom-namespace"
)

A Client does not have an explicit close.