Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(internal): updated imports #411

Merged
merged 1 commit into from
Dec 14, 2024
Merged
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
77 changes: 43 additions & 34 deletions src/openlayer/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import httpx

from . import resources, _exceptions
from . import _exceptions
from ._qs import Querystring
from ._types import (
NOT_GIVEN,
Expand All @@ -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",
Expand All @@ -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

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

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

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

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