diff --git a/src/honcho/_client.py b/src/honcho/_client.py index 6da443c..844ae11 100644 --- a/src/honcho/_client.py +++ b/src/honcho/_client.py @@ -8,7 +8,7 @@ import httpx -from . import _exceptions +from . import resources, _exceptions from ._qs import Querystring from ._types import ( NOT_GIVEN, @@ -31,7 +31,6 @@ SyncAPIClient, AsyncAPIClient, ) -from .resources.apps import apps __all__ = [ "ENVIRONMENTS", @@ -39,6 +38,7 @@ "Transport", "ProxiesTypes", "RequestOptions", + "resources", "Honcho", "AsyncHoncho", "Client", @@ -52,7 +52,7 @@ class Honcho(SyncAPIClient): - apps: apps.AppsResource + apps: resources.AppsResource with_raw_response: HonchoWithRawResponse with_streaming_response: HonchoWithStreamedResponse @@ -130,7 +130,7 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.apps = apps.AppsResource(self) + self.apps = resources.AppsResource(self) self.with_raw_response = HonchoWithRawResponse(self) self.with_streaming_response = HonchoWithStreamedResponse(self) @@ -244,7 +244,7 @@ def _make_status_error( class AsyncHoncho(AsyncAPIClient): - apps: apps.AsyncAppsResource + apps: resources.AsyncAppsResource with_raw_response: AsyncHonchoWithRawResponse with_streaming_response: AsyncHonchoWithStreamedResponse @@ -322,7 +322,7 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.apps = apps.AsyncAppsResource(self) + self.apps = resources.AsyncAppsResource(self) self.with_raw_response = AsyncHonchoWithRawResponse(self) self.with_streaming_response = AsyncHonchoWithStreamedResponse(self) @@ -437,22 +437,22 @@ def _make_status_error( class HonchoWithRawResponse: def __init__(self, client: Honcho) -> None: - self.apps = apps.AppsResourceWithRawResponse(client.apps) + self.apps = resources.AppsResourceWithRawResponse(client.apps) class AsyncHonchoWithRawResponse: def __init__(self, client: AsyncHoncho) -> None: - self.apps = apps.AsyncAppsResourceWithRawResponse(client.apps) + self.apps = resources.AsyncAppsResourceWithRawResponse(client.apps) class HonchoWithStreamedResponse: def __init__(self, client: Honcho) -> None: - self.apps = apps.AppsResourceWithStreamingResponse(client.apps) + self.apps = resources.AppsResourceWithStreamingResponse(client.apps) class AsyncHonchoWithStreamedResponse: def __init__(self, client: AsyncHoncho) -> None: - self.apps = apps.AsyncAppsResourceWithStreamingResponse(client.apps) + self.apps = resources.AsyncAppsResourceWithStreamingResponse(client.apps) Client = Honcho diff --git a/src/honcho/resources/apps/apps.py b/src/honcho/resources/apps/apps.py index 2138f32..cc5013e 100644 --- a/src/honcho/resources/apps/apps.py +++ b/src/honcho/resources/apps/apps.py @@ -6,6 +6,14 @@ import httpx +from .users import ( + UsersResource, + AsyncUsersResource, + UsersResourceWithRawResponse, + AsyncUsersResourceWithRawResponse, + UsersResourceWithStreamingResponse, + AsyncUsersResourceWithStreamingResponse, +) from ...types import app_create_params, app_update_params from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( @@ -21,14 +29,7 @@ async_to_streamed_response_wrapper, ) from ...types.app import App -from .users.users import ( - UsersResource, - AsyncUsersResource, - UsersResourceWithRawResponse, - AsyncUsersResourceWithRawResponse, - UsersResourceWithStreamingResponse, - AsyncUsersResourceWithStreamingResponse, -) +from .users.users import UsersResource, AsyncUsersResource from ..._base_client import make_request_options __all__ = ["AppsResource", "AsyncAppsResource"] diff --git a/src/honcho/resources/apps/users/users.py b/src/honcho/resources/apps/users/users.py index 77cb387..1c10672 100644 --- a/src/honcho/resources/apps/users/users.py +++ b/src/honcho/resources/apps/users/users.py @@ -6,12 +6,28 @@ import httpx +from .sessions import ( + SessionsResource, + AsyncSessionsResource, + SessionsResourceWithRawResponse, + AsyncSessionsResourceWithRawResponse, + SessionsResourceWithStreamingResponse, + AsyncSessionsResourceWithStreamingResponse, +) from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import ( maybe_transform, async_maybe_transform, ) from ...._compat import cached_property +from .collections import ( + CollectionsResource, + AsyncCollectionsResource, + CollectionsResourceWithRawResponse, + AsyncCollectionsResourceWithRawResponse, + CollectionsResourceWithStreamingResponse, + AsyncCollectionsResourceWithStreamingResponse, +) from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( to_raw_response_wrapper, @@ -30,23 +46,9 @@ from ....pagination import SyncPage, AsyncPage from ....types.apps import user_list_params, user_create_params, user_update_params from ...._base_client import AsyncPaginator, make_request_options -from .sessions.sessions import ( - SessionsResource, - AsyncSessionsResource, - SessionsResourceWithRawResponse, - AsyncSessionsResourceWithRawResponse, - SessionsResourceWithStreamingResponse, - AsyncSessionsResourceWithStreamingResponse, -) +from .sessions.sessions import SessionsResource, AsyncSessionsResource from ....types.apps.user import User -from .collections.collections import ( - CollectionsResource, - AsyncCollectionsResource, - CollectionsResourceWithRawResponse, - AsyncCollectionsResourceWithRawResponse, - CollectionsResourceWithStreamingResponse, - AsyncCollectionsResourceWithStreamingResponse, -) +from .collections.collections import CollectionsResource, AsyncCollectionsResource __all__ = ["UsersResource", "AsyncUsersResource"]