Skip to main content

How to set a Namespace for a Temporal Client in Python

To specify a Namespace, set the namespace parameter from the connect() method.

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

Client can be directly instantiated with a service of another, such as when you need to create another Client to use an additional Namespace.

Clients also provide a shallow copy of their config for use in making slightly different Clients backed by the same connection with config. The following example creates a new Client with the same connection but a different Namespace.

config = client.config()
config["namespace"] = "your-other-namespace"
other_ns_client = Client(**config)