Skip to content

Commit 312a04d

Browse files
chore(internal): codegen related update (#410)
1 parent 915f5d7 commit 312a04d

File tree

1 file changed

+34
-43
lines changed

1 file changed

+34
-43
lines changed

src/openlayer/_client.py

Lines changed: 34 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import httpx
1010

11-
from . import _exceptions
11+
from . import resources, _exceptions
1212
from ._qs import Querystring
1313
from ._types import (
1414
NOT_GIVEN,
@@ -32,16 +32,13 @@
3232
SyncAPIClient,
3333
AsyncAPIClient,
3434
)
35-
from .resources.commits import commits
36-
from .resources.storage import storage
37-
from .resources.projects import projects
38-
from .resources.inference_pipelines import inference_pipelines
3935

4036
__all__ = [
4137
"Timeout",
4238
"Transport",
4339
"ProxiesTypes",
4440
"RequestOptions",
41+
"resources",
4542
"Openlayer",
4643
"AsyncOpenlayer",
4744
"Client",
@@ -50,10 +47,10 @@
5047

5148

5249
class Openlayer(SyncAPIClient):
53-
projects: projects.ProjectsResource
54-
commits: commits.CommitsResource
55-
inference_pipelines: inference_pipelines.InferencePipelinesResource
56-
storage: storage.StorageResource
50+
projects: resources.ProjectsResource
51+
commits: resources.CommitsResource
52+
inference_pipelines: resources.InferencePipelinesResource
53+
storage: resources.StorageResource
5754
with_raw_response: OpenlayerWithRawResponse
5855
with_streaming_response: OpenlayerWithStreamedResponse
5956

@@ -107,10 +104,10 @@ def __init__(
107104
_strict_response_validation=_strict_response_validation,
108105
)
109106

110-
self.projects = projects.ProjectsResource(self)
111-
self.commits = commits.CommitsResource(self)
112-
self.inference_pipelines = inference_pipelines.InferencePipelinesResource(self)
113-
self.storage = storage.StorageResource(self)
107+
self.projects = resources.ProjectsResource(self)
108+
self.commits = resources.CommitsResource(self)
109+
self.inference_pipelines = resources.InferencePipelinesResource(self)
110+
self.storage = resources.StorageResource(self)
114111
self.with_raw_response = OpenlayerWithRawResponse(self)
115112
self.with_streaming_response = OpenlayerWithStreamedResponse(self)
116113

@@ -233,10 +230,10 @@ def _make_status_error(
233230

234231

235232
class AsyncOpenlayer(AsyncAPIClient):
236-
projects: projects.AsyncProjectsResource
237-
commits: commits.AsyncCommitsResource
238-
inference_pipelines: inference_pipelines.AsyncInferencePipelinesResource
239-
storage: storage.AsyncStorageResource
233+
projects: resources.AsyncProjectsResource
234+
commits: resources.AsyncCommitsResource
235+
inference_pipelines: resources.AsyncInferencePipelinesResource
236+
storage: resources.AsyncStorageResource
240237
with_raw_response: AsyncOpenlayerWithRawResponse
241238
with_streaming_response: AsyncOpenlayerWithStreamedResponse
242239

@@ -290,10 +287,10 @@ def __init__(
290287
_strict_response_validation=_strict_response_validation,
291288
)
292289

293-
self.projects = projects.AsyncProjectsResource(self)
294-
self.commits = commits.AsyncCommitsResource(self)
295-
self.inference_pipelines = inference_pipelines.AsyncInferencePipelinesResource(self)
296-
self.storage = storage.AsyncStorageResource(self)
290+
self.projects = resources.AsyncProjectsResource(self)
291+
self.commits = resources.AsyncCommitsResource(self)
292+
self.inference_pipelines = resources.AsyncInferencePipelinesResource(self)
293+
self.storage = resources.AsyncStorageResource(self)
297294
self.with_raw_response = AsyncOpenlayerWithRawResponse(self)
298295
self.with_streaming_response = AsyncOpenlayerWithStreamedResponse(self)
299296

@@ -417,42 +414,36 @@ def _make_status_error(
417414

418415
class OpenlayerWithRawResponse:
419416
def __init__(self, client: Openlayer) -> None:
420-
self.projects = projects.ProjectsResourceWithRawResponse(client.projects)
421-
self.commits = commits.CommitsResourceWithRawResponse(client.commits)
422-
self.inference_pipelines = inference_pipelines.InferencePipelinesResourceWithRawResponse(
423-
client.inference_pipelines
424-
)
425-
self.storage = storage.StorageResourceWithRawResponse(client.storage)
417+
self.projects = resources.ProjectsResourceWithRawResponse(client.projects)
418+
self.commits = resources.CommitsResourceWithRawResponse(client.commits)
419+
self.inference_pipelines = resources.InferencePipelinesResourceWithRawResponse(client.inference_pipelines)
420+
self.storage = resources.StorageResourceWithRawResponse(client.storage)
426421

427422

428423
class AsyncOpenlayerWithRawResponse:
429424
def __init__(self, client: AsyncOpenlayer) -> None:
430-
self.projects = projects.AsyncProjectsResourceWithRawResponse(client.projects)
431-
self.commits = commits.AsyncCommitsResourceWithRawResponse(client.commits)
432-
self.inference_pipelines = inference_pipelines.AsyncInferencePipelinesResourceWithRawResponse(
433-
client.inference_pipelines
434-
)
435-
self.storage = storage.AsyncStorageResourceWithRawResponse(client.storage)
425+
self.projects = resources.AsyncProjectsResourceWithRawResponse(client.projects)
426+
self.commits = resources.AsyncCommitsResourceWithRawResponse(client.commits)
427+
self.inference_pipelines = resources.AsyncInferencePipelinesResourceWithRawResponse(client.inference_pipelines)
428+
self.storage = resources.AsyncStorageResourceWithRawResponse(client.storage)
436429

437430

438431
class OpenlayerWithStreamedResponse:
439432
def __init__(self, client: Openlayer) -> None:
440-
self.projects = projects.ProjectsResourceWithStreamingResponse(client.projects)
441-
self.commits = commits.CommitsResourceWithStreamingResponse(client.commits)
442-
self.inference_pipelines = inference_pipelines.InferencePipelinesResourceWithStreamingResponse(
443-
client.inference_pipelines
444-
)
445-
self.storage = storage.StorageResourceWithStreamingResponse(client.storage)
433+
self.projects = resources.ProjectsResourceWithStreamingResponse(client.projects)
434+
self.commits = resources.CommitsResourceWithStreamingResponse(client.commits)
435+
self.inference_pipelines = resources.InferencePipelinesResourceWithStreamingResponse(client.inference_pipelines)
436+
self.storage = resources.StorageResourceWithStreamingResponse(client.storage)
446437

447438

448439
class AsyncOpenlayerWithStreamedResponse:
449440
def __init__(self, client: AsyncOpenlayer) -> None:
450-
self.projects = projects.AsyncProjectsResourceWithStreamingResponse(client.projects)
451-
self.commits = commits.AsyncCommitsResourceWithStreamingResponse(client.commits)
452-
self.inference_pipelines = inference_pipelines.AsyncInferencePipelinesResourceWithStreamingResponse(
441+
self.projects = resources.AsyncProjectsResourceWithStreamingResponse(client.projects)
442+
self.commits = resources.AsyncCommitsResourceWithStreamingResponse(client.commits)
443+
self.inference_pipelines = resources.AsyncInferencePipelinesResourceWithStreamingResponse(
453444
client.inference_pipelines
454445
)
455-
self.storage = storage.AsyncStorageResourceWithStreamingResponse(client.storage)
446+
self.storage = resources.AsyncStorageResourceWithStreamingResponse(client.storage)
456447

457448

458449
Client = Openlayer

0 commit comments

Comments
 (0)