Skip to content

Commit

Permalink
chore(internal): codegen related update (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 14, 2024
1 parent 62d7c38 commit e5b574e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 34 deletions.
20 changes: 10 additions & 10 deletions src/honcho/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import httpx

from . import _exceptions
from . import resources, _exceptions
from ._qs import Querystring
from ._types import (
NOT_GIVEN,
Expand All @@ -31,14 +31,14 @@
SyncAPIClient,
AsyncAPIClient,
)
from .resources.apps import apps

__all__ = [
"ENVIRONMENTS",
"Timeout",
"Transport",
"ProxiesTypes",
"RequestOptions",
"resources",
"Honcho",
"AsyncHoncho",
"Client",
Expand All @@ -52,7 +52,7 @@


class Honcho(SyncAPIClient):
apps: apps.AppsResource
apps: resources.AppsResource
with_raw_response: HonchoWithRawResponse
with_streaming_response: HonchoWithStreamedResponse

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
17 changes: 9 additions & 8 deletions src/honcho/resources/apps/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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"]
Expand Down
34 changes: 18 additions & 16 deletions src/honcho/resources/apps/users/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"]

Expand Down

0 comments on commit e5b574e

Please sign in to comment.