Skip to content

Commit

Permalink
Add retries documentation (#200)
Browse files Browse the repository at this point in the history
* Add retries documentation

* lint

* lint

* Update README.md

Co-authored-by: Ben Tranter <[email protected]>

---------

Co-authored-by: Ben Tranter <[email protected]>
  • Loading branch information
danaelhe and bentranter authored Sep 26, 2023
1 parent c9ad85d commit 693af8c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@ else:
paginated = False
```

#### Retries and Backoff

By default the client uses the same retry policy as the [Azure SDK for Python](https://learn.microsoft.com/en-us/python/api/azure-core/azure.core.pipeline.policies.retrypolicy?view=azure-python).
retry policy. If you'd like to modify any of these values, you can pass them as keywords to your client initialization:

```python
client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"), retry_total=3)
```

or

```python
client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"), retry_policy=MyRetryPolicy())
```

# **Contributing**

>Visit our [Contribuing Guide](CONTRIBUTING.md) for more information on getting
Expand Down

0 comments on commit 693af8c

Please sign in to comment.