From 499b9ef696543afb836975605a53ede4c27c3e91 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Wed, 3 Jan 2024 22:11:47 +0000 Subject: [PATCH] Documents usage of `DAPR_API_TOKEN` Signed-off-by: Elena Kolevska --- daprdocs/content/en/python-sdk-docs/python-client.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/python-sdk-docs/python-client.md b/daprdocs/content/en/python-sdk-docs/python-client.md index 73a1cf703..7cf5756e4 100644 --- a/daprdocs/content/en/python-sdk-docs/python-client.md +++ b/daprdocs/content/en/python-sdk-docs/python-client.md @@ -39,7 +39,8 @@ with DaprClient() as d: ``` #### Specifying an endpoint on initialisation: -When passed as an argument in the constructor, the gRPC endpoint takes precedence over any configuration or environment variable. +When passed as an argument in the constructor, the gRPC endpoint takes precedence over any +configuration or environment variable. ```python from dapr.clients import DaprClient @@ -48,7 +49,9 @@ with DaprClient("mydomain:50051?tls=true") as d: # use the client ``` -#### Specifying the endpoint in an environment variable: +#### Environment variables: + +##### Dapr Sidecar Endpoints You can use the standardised `DAPR_GRPC_ENDPOINT` environment variable to specify the gRPC endpoint. When this variable is set, the client can be initialised without any arguments: @@ -66,6 +69,9 @@ with DaprClient() as d: The legacy environment variables `DAPR_RUNTIME_HOST`, `DAPR_HTTP_PORT` and `DAPR_GRPC_PORT` are also supported, but `DAPR_GRPC_ENDPOINT` takes precedence. +##### Dapr API Token + +You can use the `DAPR_API_TOKEN` environment variable to set the Dapr API token. ## Building blocks