Skip to content

Commit d78dc9d

Browse files
committed
restore some aliases
1 parent b6de8fc commit d78dc9d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

src/workos/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@
2020
from ._pagination import AsyncPage, SyncPage
2121
from ._types import RequestOptions
2222

23+
WorkOS = WorkOSClient
24+
AsyncWorkOS = AsyncWorkOSClient
25+
2326
__all__ = [
2427
"WorkOSClient",
2528
"AsyncWorkOSClient",
29+
"WorkOS",
30+
"AsyncWorkOS",
2631
"RequestOptions",
2732
"BaseRequestException",
2833
"AuthenticationException",

src/workos/_client.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
from .webhooks._resource import Webhooks, AsyncWebhooks
122122
from .widgets._resource import Widgets, AsyncWidgets
123123
from .audit_logs._resource import AuditLogs, AsyncAuditLogs
124+
from .session import AsyncSession, Session
124125

125126
try:
126127
from importlib.metadata import version as _pkg_version
@@ -223,6 +224,15 @@ def data_providers(self) -> UserManagementDataProviders:
223224
def multi_factor_authentication(self) -> UserManagementMultiFactorAuthentication:
224225
return UserManagementMultiFactorAuthentication(self._client)
225226

227+
def load_sealed_session(
228+
self, *, sealed_session: str, cookie_password: str
229+
) -> Session:
230+
return Session(
231+
client=self._client,
232+
session_data=sealed_session,
233+
cookie_password=cookie_password,
234+
)
235+
226236

227237
class UserManagementUsersNamespace(object):
228238
"""UserManagementUsers resources."""
@@ -328,6 +338,15 @@ def multi_factor_authentication(
328338
) -> AsyncUserManagementMultiFactorAuthentication:
329339
return AsyncUserManagementMultiFactorAuthentication(self._client)
330340

341+
def load_sealed_session(
342+
self, *, sealed_session: str, cookie_password: str
343+
) -> AsyncSession:
344+
return AsyncSession(
345+
client=self._client,
346+
session_data=sealed_session,
347+
cookie_password=cookie_password,
348+
)
349+
331350

332351
class AsyncUserManagementUsersNamespace(object):
333352
"""UserManagementUsers resources (async)."""
@@ -1086,3 +1105,8 @@ async def _fetch(*, after: Optional[str] = None) -> AsyncPage[D]:
10861105
)
10871106

10881107
return AsyncPage(data=items, list_metadata=list_metadata, _fetch_page=_fetch)
1108+
1109+
1110+
# Top-level client aliases retained for SDK ergonomics and internal typing
1111+
WorkOS = WorkOSClient
1112+
AsyncWorkOS = AsyncWorkOSClient

0 commit comments

Comments
 (0)