Skip to content

Commit 0b10211

Browse files
committed
docs: update pypi tables and snippets to highlight new timeout parameter
1 parent 7c82c76 commit 0b10211

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/readme-pypi.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ resp = client.request(
6060
)
6161
```
6262

63+
### Configuring Network Timeouts
64+
65+
By default, the SDK uses a 30-second timeout for all network requests. You can easily override it passing a `timeout` explicitly during initialization:
66+
67+
```python
68+
from openapi_python_sdk.client import Client
69+
70+
client = Client(token="token", timeout=60.0) # 60 seconds
71+
```
72+
6373
## Testing
6474

6575
```bash
@@ -71,7 +81,7 @@ pytest
7181

7282
| Method | Description |
7383
|---|---|
74-
| `OauthClient(username, apikey, test=False)` | Initialize the OAuth client. Set `test=True` for sandbox. |
84+
| `OauthClient(username, apikey, test=False, timeout=30.0)` | Initialize the OAuth client. Set `test=True` for sandbox. |
7585
| `create_token(scopes, ttl)` | Create a bearer token for the given scopes and TTL (seconds). |
7686
| `get_token(scope)` | Retrieve an existing token by scope. |
7787
| `delete_token(id)` | Revoke a token by ID. |
@@ -82,7 +92,7 @@ pytest
8292

8393
| Method | Description |
8494
|---|---|
85-
| `Client(token)` | Initialize the client with a bearer token. |
95+
| `Client(token, timeout=30.0)` | Initialize the client with a bearer token. |
8696
| `request(method, url, payload, params)` | Execute an HTTP request against any Openapi endpoint. |
8797

8898
## Links

0 commit comments

Comments
 (0)