Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/workos/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from workos._client_configuration import ClientConfiguration
from workos.api_keys import ApiKeysModule
from workos.audit_logs import AuditLogsModule
from workos.authorization import AuthorizationModule
from workos.directory_sync import DirectorySyncModule
from workos.events import EventsModule
from workos.fga import FGAModule
Expand Down Expand Up @@ -74,6 +75,10 @@ def __init__(
@abstractmethod
def api_keys(self) -> ApiKeysModule: ...

@property
@abstractmethod
def authorization(self) -> AuthorizationModule: ...

@property
@abstractmethod
def audit_logs(self) -> AuditLogsModule: ...
Expand Down
7 changes: 7 additions & 0 deletions src/workos/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from workos._base_client import BaseClient
from workos.api_keys import AsyncApiKeys
from workos.audit_logs import AsyncAuditLogs
from workos.authorization import AsyncAuthorization
from workos.directory_sync import AsyncDirectorySync
from workos.events import AsyncEvents
from workos.fga import FGAModule
Expand Down Expand Up @@ -55,6 +56,12 @@ def api_keys(self) -> AsyncApiKeys:
self._api_keys = AsyncApiKeys(self._http_client)
return self._api_keys

@property
def authorization(self) -> AsyncAuthorization:
if not getattr(self, "_authorization", None):
self._authorization = AsyncAuthorization(self._http_client)
return self._authorization

@property
def sso(self) -> AsyncSSO:
if not getattr(self, "_sso", None):
Expand Down
Loading