Skip to content

Commit

Permalink
Documents usage of DAPR_API_TOKEN
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Kolevska <elena@kolevska.com>
  • Loading branch information
elena-kolevska committed Jan 3, 2024
1 parent 6ee22eb commit 499b9ef
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions daprdocs/content/en/python-sdk-docs/python-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit 499b9ef

Please sign in to comment.