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 @@ -6,6 +6,7 @@
from workos.api_keys import ApiKeysModule
from workos.audit_logs import AuditLogsModule
from workos.authorization import AuthorizationModule
from workos.connect import ConnectModule
from workos.directory_sync import DirectorySyncModule
from workos.events import EventsModule
from workos.fga import FGAModule
Expand Down Expand Up @@ -79,6 +80,10 @@ def api_keys(self) -> ApiKeysModule: ...
@abstractmethod
def authorization(self) -> AuthorizationModule: ...

@property
@abstractmethod
def connect(self) -> ConnectModule: ...

@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 @@ -4,6 +4,7 @@
from workos.api_keys import AsyncApiKeys
from workos.audit_logs import AsyncAuditLogs
from workos.authorization import AsyncAuthorization
from workos.connect import AsyncConnect
from workos.directory_sync import AsyncDirectorySync
from workos.events import AsyncEvents
from workos.fga import FGAModule
Expand Down Expand Up @@ -50,6 +51,12 @@ def __init__(
timeout=self.request_timeout,
)

@property
def connect(self) -> AsyncConnect:
if not getattr(self, "_connect", None):
self._connect = AsyncConnect(self._http_client)
return self._connect

@property
def api_keys(self) -> AsyncApiKeys:
if not getattr(self, "_api_keys", None):
Expand Down
7 changes: 7 additions & 0 deletions src/workos/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from workos.api_keys import ApiKeys
from workos.audit_logs import AuditLogs
from workos.authorization import Authorization
from workos.connect import Connect
from workos.directory_sync import DirectorySync
from workos.fga import FGA
from workos.organizations import Organizations
Expand Down Expand Up @@ -50,6 +51,12 @@ def __init__(
timeout=self.request_timeout,
)

@property
def connect(self) -> Connect:
if not getattr(self, "_connect", None):
self._connect = Connect(self._http_client)
return self._connect

@property
def api_keys(self) -> ApiKeys:
if not getattr(self, "_api_keys", None):
Expand Down
Loading