You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every HTTP API method has an identical async counterpart on `AsyncWorkOSClient`. (Pure-local utilities such as webhook signature verification, Actions helpers, and PKCE are synchronous on both clients.)
38
40
39
41
```python
40
42
from workos import AsyncWorkOSClient
@@ -59,27 +61,35 @@ The client reads credentials from the environment when not passed explicitly:
59
61
60
62
## Available Resources
61
63
62
-
The client exposes the full WorkOS API through typed namespace properties:
64
+
The client exposes the WorkOS API through typed namespace properties:
63
65
64
66
| Property | Description |
65
67
|----------|-------------|
66
68
|`client.sso`| Single Sign-On connections and authorization |
@@ -124,9 +134,13 @@ except RateLimitExceededError as e:
124
134
|`RateLimitExceededError`| 429 |
125
135
|`ServerError`| 5xx |
126
136
137
+
## Retries
138
+
139
+
The client automatically retries requests up to 3 times (configurable via the `max_retries` request option) on 429 and 5xx responses, timeouts, and connection errors, using exponential backoff with jitter and honoring `Retry-After`. The SDK attaches an auto-generated `Idempotency-Key` (UUID v4) to every `POST` request and reuses the same key across its internal retries.
140
+
127
141
## Per-Request Options
128
142
129
-
Every method accepts `request_options` for per-call overrides:
143
+
Every API method accepts `request_options` for per-call overrides (local helpers such as webhook/Actions signature verification and PKCE utilities do not make HTTP calls and don't take `request_options`):
130
144
131
145
```python
132
146
result = client.organizations.list_organizations(
@@ -145,7 +159,7 @@ result = client.organizations.list_organizations(
145
159
146
160
## Type Safety
147
161
148
-
This SDK ships with full type annotations (`py.typed` / PEP 561) and works with mypy, pyright, and IDE autocompletion out of the box. All models are `@dataclass(slots=True)` classes with `from_dict()` / `to_dict()` for serialization.
162
+
This SDK ships with full type annotations (`py.typed` / PEP 561) and works with mypy, pyright, and IDE autocompletion out of the box. All API resource models are `@dataclass(slots=True)` classes with `from_dict()` / `to_dict()` for serialization.
0 commit comments