Client Configuration
A Hatchet client is initialized via:
from hatchet_sdk import Hatchet
hatchet = Hatchet()
You can configure the Hatchet client by setting environment variables or setting the config directly when initializing the client. The following are the most common environment variables to configure and are considered stable:
Variable | Description | Default |
---|---|---|
HATCHET_CLIENT_TOKEN | The tenant-scoped API token to use. | N/A |
HATCHET_CLIENT_TLS_STRATEGY | The TLS strategy to use. Valid values are none , tls , and mtls . | tls |
HATCHET_CLIENT_NAMESPACE | The namespace to use. | N/A |
You can also configure the client by overriding the ClientConfig
optional keyword argument on the Hatchet
initializer. For example:
from hatchet_sdk import Hatchet, ClientConfig
hatchet = Hatchet(
config=ClientConfig(
token="my-token",
namespace="my-namespace",
)
)
This is most commonly used to set the namespace, or to configure Hatchet's logger.