Skip to content

Commit a902e28

Browse files
committed
cleanup on docstrings
1 parent ff17675 commit a902e28

44 files changed

Lines changed: 1059 additions & 334 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/workos/__init__.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33
"""WorkOS Python SDK."""
44

55
from ._client import AsyncWorkOSClient, WorkOSClient
6-
from ._errors import WorkOSError
6+
from ._errors import (
7+
WorkOSError,
8+
AuthenticationError,
9+
AuthorizationError,
10+
BadRequestError,
11+
ConflictError,
12+
NotFoundError,
13+
RateLimitExceededError,
14+
ServerError,
15+
UnprocessableEntityError,
16+
)
717
from ._pagination import AsyncPage, ListMetadata, SyncPage
818
from .public_client import create_public_client
919
from ._types import RequestOptions
@@ -12,6 +22,14 @@
1222
"WorkOSClient",
1323
"AsyncWorkOSClient",
1424
"WorkOSError",
25+
"AuthenticationError",
26+
"AuthorizationError",
27+
"BadRequestError",
28+
"ConflictError",
29+
"NotFoundError",
30+
"RateLimitExceededError",
31+
"ServerError",
32+
"UnprocessableEntityError",
1533
"SyncPage",
1634
"AsyncPage",
1735
"ListMetadata",

src/workos/_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,22 @@ def mfa(self) -> MultiFactorAuth:
129129

130130
@functools.cached_property
131131
def passwordless(self) -> Passwordless:
132+
"""Passwordless authentication sessions."""
132133
return Passwordless(self)
133134

134135
@functools.cached_property
135136
def vault(self) -> Vault:
137+
"""Vault encryption, key management, and secret storage."""
136138
return Vault(self)
137139

138140
@functools.cached_property
139141
def actions(self) -> Actions:
142+
"""Actions logging and audit trail."""
140143
return Actions()
141144

142145
@functools.cached_property
143146
def pkce(self) -> PKCE:
147+
"""PKCE (Proof Key for Code Exchange) utilities."""
144148
return PKCE()
145149

146150

@@ -239,16 +243,20 @@ def mfa(self) -> AsyncMultiFactorAuth:
239243

240244
@functools.cached_property
241245
def passwordless(self) -> AsyncPasswordless:
246+
"""Passwordless authentication sessions."""
242247
return AsyncPasswordless(self)
243248

244249
@functools.cached_property
245250
def vault(self) -> AsyncVault:
251+
"""Vault encryption, key management, and secret storage."""
246252
return AsyncVault(self)
247253

248254
@functools.cached_property
249255
def actions(self) -> AsyncActions:
256+
"""Actions logging and audit trail."""
250257
return AsyncActions()
251258

252259
@functools.cached_property
253260
def pkce(self) -> PKCE:
261+
"""PKCE (Proof Key for Code Exchange) utilities."""
254262
return PKCE()

src/workos/api_keys/_resource.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ def list_organization_api_keys(
9595
9696
Args:
9797
organization_id: Unique identifier of the Organization.
98-
limit: Upper limit on the number of objects to return, between `1` and `100`.
98+
limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
9999
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
100100
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
101-
order: Order the results by the creation time.
101+
order: Order the results by the creation time. Defaults to `desc`.
102102
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
103103
104104
Returns:
@@ -255,10 +255,10 @@ async def list_organization_api_keys(
255255
256256
Args:
257257
organization_id: Unique identifier of the Organization.
258-
limit: Upper limit on the number of objects to return, between `1` and `100`.
258+
limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
259259
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
260260
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
261-
order: Order the results by the creation time.
261+
order: Order the results by the creation time. Defaults to `desc`.
262262
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
263263
264264
Returns:

src/workos/audit_logs/_resource.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ def list_actions(
109109
Get a list of all Audit Log actions in the current environment.
110110
111111
Args:
112-
limit: Upper limit on the number of objects to return, between `1` and `100`.
112+
limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
113113
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
114114
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
115-
order: Order the results by the creation time.
115+
order: Order the results by the creation time. Defaults to `desc`.
116116
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
117117
118118
Returns:
@@ -159,10 +159,10 @@ def list_action_schemas(
159159
160160
Args:
161161
action_name: The name of the Audit Log action.
162-
limit: Upper limit on the number of objects to return, between `1` and `100`.
162+
limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
163163
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
164164
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
165-
order: Order the results by the creation time.
165+
order: Order the results by the creation time. Defaults to `desc`.
166166
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
167167
168168
Returns:
@@ -464,10 +464,10 @@ async def list_actions(
464464
Get a list of all Audit Log actions in the current environment.
465465
466466
Args:
467-
limit: Upper limit on the number of objects to return, between `1` and `100`.
467+
limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
468468
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
469469
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
470-
order: Order the results by the creation time.
470+
order: Order the results by the creation time. Defaults to `desc`.
471471
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
472472
473473
Returns:
@@ -514,10 +514,10 @@ async def list_action_schemas(
514514
515515
Args:
516516
action_name: The name of the Audit Log action.
517-
limit: Upper limit on the number of objects to return, between `1` and `100`.
517+
limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
518518
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
519519
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
520-
order: Order the results by the creation time.
520+
order: Order the results by the creation time. Defaults to `desc`.
521521
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
522522
523523
Returns:

src/workos/audit_logs/models/audit_log_export_creation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AuditLogExportCreation:
2222
actors: Optional[List[str]] = None
2323
"""Deprecated. Use `actor_names` instead.
2424
25-
.. deprecated::"""
25+
.. deprecated:: This field is deprecated."""
2626
actor_names: Optional[List[str]] = None
2727
"""List of actor names to filter against."""
2828
actor_ids: Optional[List[str]] = None

0 commit comments

Comments
 (0)