Skip to content

Commit 21f1eb8

Browse files
authored
Fix RTF index and sync with top README (#792)
1 parent a2ac40a commit 21f1eb8

File tree

1 file changed

+51
-10
lines changed

1 file changed

+51
-10
lines changed

docs/README.md

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,12 @@ configuration.unstable_operations["<OperationName>"] = True
8181

8282
where `<OperationName>` is the name of the method used to interact with that endpoint. For example: `list_log_indexes`, or `get_logs_index`
8383

84-
## Documentation for API Endpoints and Models
85-
86-
Documentation for API endpoints and models can be found under the docs subdirectories, in [v1](/docs/v1#documentation-for-api-endpoints) and [v2](/docs/v2#documentation-for-api-endpoints).
87-
88-
It's also available on [readthedocs](https://datadog-api-client.readthedocs.io/).
89-
90-
## Documentation for Authorization
84+
### Changing Server
9185

92-
Authenticate with the API by providing your API and Application keys in the configuration:
86+
When talking to a different server, like the `eu` instance, change the `server_variables` on your configuration object:
9387

9488
```python
95-
configuration.api_key["apiKeyAuth"] = "YOUR_API_KEY"
96-
configuration.api_key["appKeyAuth"] = "YOUR_APPLICATION_KEY"
89+
configuration.server_variables["site"] = "datadoghq.eu"
9790
```
9891

9992
### Disable compressed payloads
@@ -105,6 +98,54 @@ on your configuration object:
10598
configuration.compress = False
10699
```
107100

101+
### Enable requests logging
102+
103+
If you want to enable requests logging, set the `debug` flag on your configuration object:
104+
105+
```python
106+
configuration.debug = True
107+
```
108+
109+
### Asyncio support
110+
111+
The library supports asynchronous operations when using `AsyncApiClient` for the transport. When that client is used,
112+
the API methods will then return coroutines that you can wait for.
113+
114+
To make async support available, you need to install the extra `async` qualifiers during installation: `pip install datadog-api-client[async]`.
115+
116+
117+
```python
118+
import asyncio
119+
120+
from datadog_api_client.v1 import Configuration, AsyncApiClient
121+
from datadog_api_client.v1.api import dashboards_api
122+
123+
async def main():
124+
configuration = Configuration()
125+
async with AsyncApiClient(configuration) as api_client:
126+
api_instance = dashboards_api.DashboardsApi(api_client)
127+
dashbooards = await api_instance.list_dashboards()
128+
print(dashbooards)
129+
130+
asyncio.run(main())
131+
```
132+
133+
## Documentation for API Endpoints and Models
134+
135+
Documentation for API endpoints and models can be found under the specific version subdirectories, in [v1](./v1#documentation-for-api-endpoints) and [v2](./v2#documentation-for-api-endpoints).
136+
137+
It's also available on [readthedocs](https://datadog-api-client.readthedocs.io/).
138+
139+
## Documentation for Authorization
140+
141+
Authenticate with the API by providing your API and Application keys in the configuration:
142+
143+
```python
144+
configuration.api_key["apiKeyAuth"] = "YOUR_API_KEY"
145+
configuration.api_key["appKeyAuth"] = "YOUR_APPLICATION_KEY"
146+
```
147+
108148
## Author
109149

110150
151+

0 commit comments

Comments
 (0)