From f59c50ebd7b298536f0a6a92437630551074e172 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 05:46:26 +0000 Subject: [PATCH] chore(internal): codegen related update (#409) --- src/openlayer/_client.py | 77 ++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/src/openlayer/_client.py b/src/openlayer/_client.py index 008dee8a..d5e7a8ea 100644 --- a/src/openlayer/_client.py +++ b/src/openlayer/_client.py @@ -8,7 +8,7 @@ import httpx -from . import resources, _exceptions +from . import _exceptions from ._qs import Querystring from ._types import ( NOT_GIVEN, @@ -32,13 +32,16 @@ SyncAPIClient, AsyncAPIClient, ) +from .resources.commits import commits +from .resources.storage import storage +from .resources.projects import projects +from .resources.inference_pipelines import inference_pipelines __all__ = [ "Timeout", "Transport", "ProxiesTypes", "RequestOptions", - "resources", "Openlayer", "AsyncOpenlayer", "Client", @@ -47,10 +50,10 @@ class Openlayer(SyncAPIClient): - projects: resources.ProjectsResource - commits: resources.CommitsResource - inference_pipelines: resources.InferencePipelinesResource - storage: resources.StorageResource + projects: projects.ProjectsResource + commits: commits.CommitsResource + inference_pipelines: inference_pipelines.InferencePipelinesResource + storage: storage.StorageResource with_raw_response: OpenlayerWithRawResponse with_streaming_response: OpenlayerWithStreamedResponse @@ -104,10 +107,10 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.projects = resources.ProjectsResource(self) - self.commits = resources.CommitsResource(self) - self.inference_pipelines = resources.InferencePipelinesResource(self) - self.storage = resources.StorageResource(self) + self.projects = projects.ProjectsResource(self) + self.commits = commits.CommitsResource(self) + self.inference_pipelines = inference_pipelines.InferencePipelinesResource(self) + self.storage = storage.StorageResource(self) self.with_raw_response = OpenlayerWithRawResponse(self) self.with_streaming_response = OpenlayerWithStreamedResponse(self) @@ -230,10 +233,10 @@ def _make_status_error( class AsyncOpenlayer(AsyncAPIClient): - projects: resources.AsyncProjectsResource - commits: resources.AsyncCommitsResource - inference_pipelines: resources.AsyncInferencePipelinesResource - storage: resources.AsyncStorageResource + projects: projects.AsyncProjectsResource + commits: commits.AsyncCommitsResource + inference_pipelines: inference_pipelines.AsyncInferencePipelinesResource + storage: storage.AsyncStorageResource with_raw_response: AsyncOpenlayerWithRawResponse with_streaming_response: AsyncOpenlayerWithStreamedResponse @@ -287,10 +290,10 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.projects = resources.AsyncProjectsResource(self) - self.commits = resources.AsyncCommitsResource(self) - self.inference_pipelines = resources.AsyncInferencePipelinesResource(self) - self.storage = resources.AsyncStorageResource(self) + self.projects = projects.AsyncProjectsResource(self) + self.commits = commits.AsyncCommitsResource(self) + self.inference_pipelines = inference_pipelines.AsyncInferencePipelinesResource(self) + self.storage = storage.AsyncStorageResource(self) self.with_raw_response = AsyncOpenlayerWithRawResponse(self) self.with_streaming_response = AsyncOpenlayerWithStreamedResponse(self) @@ -414,36 +417,42 @@ def _make_status_error( class OpenlayerWithRawResponse: def __init__(self, client: Openlayer) -> None: - self.projects = resources.ProjectsResourceWithRawResponse(client.projects) - self.commits = resources.CommitsResourceWithRawResponse(client.commits) - self.inference_pipelines = resources.InferencePipelinesResourceWithRawResponse(client.inference_pipelines) - self.storage = resources.StorageResourceWithRawResponse(client.storage) + self.projects = projects.ProjectsResourceWithRawResponse(client.projects) + self.commits = commits.CommitsResourceWithRawResponse(client.commits) + self.inference_pipelines = inference_pipelines.InferencePipelinesResourceWithRawResponse( + client.inference_pipelines + ) + self.storage = storage.StorageResourceWithRawResponse(client.storage) class AsyncOpenlayerWithRawResponse: def __init__(self, client: AsyncOpenlayer) -> None: - self.projects = resources.AsyncProjectsResourceWithRawResponse(client.projects) - self.commits = resources.AsyncCommitsResourceWithRawResponse(client.commits) - self.inference_pipelines = resources.AsyncInferencePipelinesResourceWithRawResponse(client.inference_pipelines) - self.storage = resources.AsyncStorageResourceWithRawResponse(client.storage) + self.projects = projects.AsyncProjectsResourceWithRawResponse(client.projects) + self.commits = commits.AsyncCommitsResourceWithRawResponse(client.commits) + self.inference_pipelines = inference_pipelines.AsyncInferencePipelinesResourceWithRawResponse( + client.inference_pipelines + ) + self.storage = storage.AsyncStorageResourceWithRawResponse(client.storage) class OpenlayerWithStreamedResponse: def __init__(self, client: Openlayer) -> None: - self.projects = resources.ProjectsResourceWithStreamingResponse(client.projects) - self.commits = resources.CommitsResourceWithStreamingResponse(client.commits) - self.inference_pipelines = resources.InferencePipelinesResourceWithStreamingResponse(client.inference_pipelines) - self.storage = resources.StorageResourceWithStreamingResponse(client.storage) + self.projects = projects.ProjectsResourceWithStreamingResponse(client.projects) + self.commits = commits.CommitsResourceWithStreamingResponse(client.commits) + self.inference_pipelines = inference_pipelines.InferencePipelinesResourceWithStreamingResponse( + client.inference_pipelines + ) + self.storage = storage.StorageResourceWithStreamingResponse(client.storage) class AsyncOpenlayerWithStreamedResponse: def __init__(self, client: AsyncOpenlayer) -> None: - self.projects = resources.AsyncProjectsResourceWithStreamingResponse(client.projects) - self.commits = resources.AsyncCommitsResourceWithStreamingResponse(client.commits) - self.inference_pipelines = resources.AsyncInferencePipelinesResourceWithStreamingResponse( + self.projects = projects.AsyncProjectsResourceWithStreamingResponse(client.projects) + self.commits = commits.AsyncCommitsResourceWithStreamingResponse(client.commits) + self.inference_pipelines = inference_pipelines.AsyncInferencePipelinesResourceWithStreamingResponse( client.inference_pipelines ) - self.storage = resources.AsyncStorageResourceWithStreamingResponse(client.storage) + self.storage = storage.AsyncStorageResourceWithStreamingResponse(client.storage) Client = Openlayer