From 932aac43080f81ac5f5e3725f068bb4a628d8c88 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 19 Jul 2024 19:49:05 +0000
Subject: [PATCH 1/4] chore(internal): version bump (#267)
---
.github/workflows/release-doctor.yml | 2 ++
README.md | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index df0fe84f..d6d56f28 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -1,6 +1,8 @@
name: Release Doctor
on:
pull_request:
+ branches:
+ - main
workflow_dispatch:
jobs:
diff --git a/README.md b/README.md
index f39d21cd..91c8fff6 100644
--- a/README.md
+++ b/README.md
@@ -403,6 +403,12 @@ client = Openlayer(
)
```
+You can also customize the client on a per-request basis by using `with_options()`:
+
+```python
+client.with_options(http_client=DefaultHttpxClient(...))
+```
+
### Managing HTTP resources
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
From 11a5605b48310b1bc9fa840865e375a74c93e55b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 22 Jul 2024 23:09:51 +0000
Subject: [PATCH 2/4] chore(internal): refactor release doctor script (#269)
---
bin/check-release-environment | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/bin/check-release-environment b/bin/check-release-environment
index c92ede25..c0077294 100644
--- a/bin/check-release-environment
+++ b/bin/check-release-environment
@@ -1,20 +1,9 @@
#!/usr/bin/env bash
-warnings=()
errors=()
if [ -z "${PYPI_TOKEN}" ]; then
- warnings+=("The OPENLAYER_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
-fi
-
-lenWarnings=${#warnings[@]}
-
-if [[ lenWarnings -gt 0 ]]; then
- echo -e "Found the following warnings in the release environment:\n"
-
- for warning in "${warnings[@]}"; do
- echo -e "- $warning\n"
- done
+ errors+=("The OPENLAYER_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
fi
lenErrors=${#errors[@]}
From b5d333bc6c654cbe0d0952f949da0bfd9bc91cf4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 22 Jul 2024 23:13:24 +0000
Subject: [PATCH 3/4] feat(api): update via SDK Studio (#270)
---
.stats.yml | 2 +-
api.md | 14 ++
src/openlayer/_client.py | 8 +
src/openlayer/resources/__init__.py | 14 ++
src/openlayer/resources/storage/__init__.py | 33 ++++
.../resources/storage/presigned_url.py | 158 ++++++++++++++++++
src/openlayer/resources/storage/storage.py | 80 +++++++++
src/openlayer/types/storage/__init__.py | 6 +
.../storage/presigned_url_create_params.py | 14 ++
.../storage/presigned_url_create_response.py | 20 +++
tests/api_resources/storage/__init__.py | 1 +
.../storage/test_presigned_url.py | 84 ++++++++++
12 files changed, 433 insertions(+), 1 deletion(-)
create mode 100644 src/openlayer/resources/storage/__init__.py
create mode 100644 src/openlayer/resources/storage/presigned_url.py
create mode 100644 src/openlayer/resources/storage/storage.py
create mode 100644 src/openlayer/types/storage/__init__.py
create mode 100644 src/openlayer/types/storage/presigned_url_create_params.py
create mode 100644 src/openlayer/types/storage/presigned_url_create_response.py
create mode 100644 tests/api_resources/storage/__init__.py
create mode 100644 tests/api_resources/storage/test_presigned_url.py
diff --git a/.stats.yml b/.stats.yml
index de479128..af63a6f7 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1 +1 @@
-configured_endpoints: 9
+configured_endpoints: 10
diff --git a/api.md b/api.md
index f9e3456e..83a58532 100644
--- a/api.md
+++ b/api.md
@@ -87,3 +87,17 @@ from openlayer.types.inference_pipelines import TestResultListResponse
Methods:
- client.inference_pipelines.test_results.list(inference_pipeline_id, \*\*params) -> TestResultListResponse
+
+# Storage
+
+## PresignedURL
+
+Types:
+
+```python
+from openlayer.types.storage import PresignedURLCreateResponse
+```
+
+Methods:
+
+- client.storage.presigned_url.create(\*\*params) -> PresignedURLCreateResponse
diff --git a/src/openlayer/_client.py b/src/openlayer/_client.py
index 4188cb39..008dee8a 100644
--- a/src/openlayer/_client.py
+++ b/src/openlayer/_client.py
@@ -50,6 +50,7 @@ class Openlayer(SyncAPIClient):
projects: resources.ProjectsResource
commits: resources.CommitsResource
inference_pipelines: resources.InferencePipelinesResource
+ storage: resources.StorageResource
with_raw_response: OpenlayerWithRawResponse
with_streaming_response: OpenlayerWithStreamedResponse
@@ -106,6 +107,7 @@ def __init__(
self.projects = resources.ProjectsResource(self)
self.commits = resources.CommitsResource(self)
self.inference_pipelines = resources.InferencePipelinesResource(self)
+ self.storage = resources.StorageResource(self)
self.with_raw_response = OpenlayerWithRawResponse(self)
self.with_streaming_response = OpenlayerWithStreamedResponse(self)
@@ -231,6 +233,7 @@ class AsyncOpenlayer(AsyncAPIClient):
projects: resources.AsyncProjectsResource
commits: resources.AsyncCommitsResource
inference_pipelines: resources.AsyncInferencePipelinesResource
+ storage: resources.AsyncStorageResource
with_raw_response: AsyncOpenlayerWithRawResponse
with_streaming_response: AsyncOpenlayerWithStreamedResponse
@@ -287,6 +290,7 @@ def __init__(
self.projects = resources.AsyncProjectsResource(self)
self.commits = resources.AsyncCommitsResource(self)
self.inference_pipelines = resources.AsyncInferencePipelinesResource(self)
+ self.storage = resources.AsyncStorageResource(self)
self.with_raw_response = AsyncOpenlayerWithRawResponse(self)
self.with_streaming_response = AsyncOpenlayerWithStreamedResponse(self)
@@ -413,6 +417,7 @@ 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)
class AsyncOpenlayerWithRawResponse:
@@ -420,6 +425,7 @@ 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)
class OpenlayerWithStreamedResponse:
@@ -427,6 +433,7 @@ 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)
class AsyncOpenlayerWithStreamedResponse:
@@ -436,6 +443,7 @@ def __init__(self, client: AsyncOpenlayer) -> None:
self.inference_pipelines = resources.AsyncInferencePipelinesResourceWithStreamingResponse(
client.inference_pipelines
)
+ self.storage = resources.AsyncStorageResourceWithStreamingResponse(client.storage)
Client = Openlayer
diff --git a/src/openlayer/resources/__init__.py b/src/openlayer/resources/__init__.py
index 28cab671..22b4e14c 100644
--- a/src/openlayer/resources/__init__.py
+++ b/src/openlayer/resources/__init__.py
@@ -8,6 +8,14 @@
CommitsResourceWithStreamingResponse,
AsyncCommitsResourceWithStreamingResponse,
)
+from .storage import (
+ StorageResource,
+ AsyncStorageResource,
+ StorageResourceWithRawResponse,
+ AsyncStorageResourceWithRawResponse,
+ StorageResourceWithStreamingResponse,
+ AsyncStorageResourceWithStreamingResponse,
+)
from .projects import (
ProjectsResource,
AsyncProjectsResource,
@@ -44,4 +52,10 @@
"AsyncInferencePipelinesResourceWithRawResponse",
"InferencePipelinesResourceWithStreamingResponse",
"AsyncInferencePipelinesResourceWithStreamingResponse",
+ "StorageResource",
+ "AsyncStorageResource",
+ "StorageResourceWithRawResponse",
+ "AsyncStorageResourceWithRawResponse",
+ "StorageResourceWithStreamingResponse",
+ "AsyncStorageResourceWithStreamingResponse",
]
diff --git a/src/openlayer/resources/storage/__init__.py b/src/openlayer/resources/storage/__init__.py
new file mode 100644
index 00000000..5de9b8e8
--- /dev/null
+++ b/src/openlayer/resources/storage/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .storage import (
+ StorageResource,
+ AsyncStorageResource,
+ StorageResourceWithRawResponse,
+ AsyncStorageResourceWithRawResponse,
+ StorageResourceWithStreamingResponse,
+ AsyncStorageResourceWithStreamingResponse,
+)
+from .presigned_url import (
+ PresignedURLResource,
+ AsyncPresignedURLResource,
+ PresignedURLResourceWithRawResponse,
+ AsyncPresignedURLResourceWithRawResponse,
+ PresignedURLResourceWithStreamingResponse,
+ AsyncPresignedURLResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "PresignedURLResource",
+ "AsyncPresignedURLResource",
+ "PresignedURLResourceWithRawResponse",
+ "AsyncPresignedURLResourceWithRawResponse",
+ "PresignedURLResourceWithStreamingResponse",
+ "AsyncPresignedURLResourceWithStreamingResponse",
+ "StorageResource",
+ "AsyncStorageResource",
+ "StorageResourceWithRawResponse",
+ "AsyncStorageResourceWithRawResponse",
+ "StorageResourceWithStreamingResponse",
+ "AsyncStorageResourceWithStreamingResponse",
+]
diff --git a/src/openlayer/resources/storage/presigned_url.py b/src/openlayer/resources/storage/presigned_url.py
new file mode 100644
index 00000000..ad2990e5
--- /dev/null
+++ b/src/openlayer/resources/storage/presigned_url.py
@@ -0,0 +1,158 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._utils import (
+ maybe_transform,
+ async_maybe_transform,
+)
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._base_client import make_request_options
+from ...types.storage import presigned_url_create_params
+from ...types.storage.presigned_url_create_response import PresignedURLCreateResponse
+
+__all__ = ["PresignedURLResource", "AsyncPresignedURLResource"]
+
+
+class PresignedURLResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> PresignedURLResourceWithRawResponse:
+ return PresignedURLResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> PresignedURLResourceWithStreamingResponse:
+ return PresignedURLResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ object_name: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> PresignedURLCreateResponse:
+ """
+ Retrieve a presigned url to post storage artifacts.
+
+ Args:
+ object_name: The name of the object.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/storage/presigned-url",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"object_name": object_name}, presigned_url_create_params.PresignedURLCreateParams
+ ),
+ ),
+ cast_to=PresignedURLCreateResponse,
+ )
+
+
+class AsyncPresignedURLResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncPresignedURLResourceWithRawResponse:
+ return AsyncPresignedURLResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncPresignedURLResourceWithStreamingResponse:
+ return AsyncPresignedURLResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ object_name: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> PresignedURLCreateResponse:
+ """
+ Retrieve a presigned url to post storage artifacts.
+
+ Args:
+ object_name: The name of the object.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/storage/presigned-url",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"object_name": object_name}, presigned_url_create_params.PresignedURLCreateParams
+ ),
+ ),
+ cast_to=PresignedURLCreateResponse,
+ )
+
+
+class PresignedURLResourceWithRawResponse:
+ def __init__(self, presigned_url: PresignedURLResource) -> None:
+ self._presigned_url = presigned_url
+
+ self.create = to_raw_response_wrapper(
+ presigned_url.create,
+ )
+
+
+class AsyncPresignedURLResourceWithRawResponse:
+ def __init__(self, presigned_url: AsyncPresignedURLResource) -> None:
+ self._presigned_url = presigned_url
+
+ self.create = async_to_raw_response_wrapper(
+ presigned_url.create,
+ )
+
+
+class PresignedURLResourceWithStreamingResponse:
+ def __init__(self, presigned_url: PresignedURLResource) -> None:
+ self._presigned_url = presigned_url
+
+ self.create = to_streamed_response_wrapper(
+ presigned_url.create,
+ )
+
+
+class AsyncPresignedURLResourceWithStreamingResponse:
+ def __init__(self, presigned_url: AsyncPresignedURLResource) -> None:
+ self._presigned_url = presigned_url
+
+ self.create = async_to_streamed_response_wrapper(
+ presigned_url.create,
+ )
diff --git a/src/openlayer/resources/storage/storage.py b/src/openlayer/resources/storage/storage.py
new file mode 100644
index 00000000..935bdc43
--- /dev/null
+++ b/src/openlayer/resources/storage/storage.py
@@ -0,0 +1,80 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from .presigned_url import (
+ PresignedURLResource,
+ AsyncPresignedURLResource,
+ PresignedURLResourceWithRawResponse,
+ AsyncPresignedURLResourceWithRawResponse,
+ PresignedURLResourceWithStreamingResponse,
+ AsyncPresignedURLResourceWithStreamingResponse,
+)
+
+__all__ = ["StorageResource", "AsyncStorageResource"]
+
+
+class StorageResource(SyncAPIResource):
+ @cached_property
+ def presigned_url(self) -> PresignedURLResource:
+ return PresignedURLResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> StorageResourceWithRawResponse:
+ return StorageResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> StorageResourceWithStreamingResponse:
+ return StorageResourceWithStreamingResponse(self)
+
+
+class AsyncStorageResource(AsyncAPIResource):
+ @cached_property
+ def presigned_url(self) -> AsyncPresignedURLResource:
+ return AsyncPresignedURLResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncStorageResourceWithRawResponse:
+ return AsyncStorageResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncStorageResourceWithStreamingResponse:
+ return AsyncStorageResourceWithStreamingResponse(self)
+
+
+class StorageResourceWithRawResponse:
+ def __init__(self, storage: StorageResource) -> None:
+ self._storage = storage
+
+ @cached_property
+ def presigned_url(self) -> PresignedURLResourceWithRawResponse:
+ return PresignedURLResourceWithRawResponse(self._storage.presigned_url)
+
+
+class AsyncStorageResourceWithRawResponse:
+ def __init__(self, storage: AsyncStorageResource) -> None:
+ self._storage = storage
+
+ @cached_property
+ def presigned_url(self) -> AsyncPresignedURLResourceWithRawResponse:
+ return AsyncPresignedURLResourceWithRawResponse(self._storage.presigned_url)
+
+
+class StorageResourceWithStreamingResponse:
+ def __init__(self, storage: StorageResource) -> None:
+ self._storage = storage
+
+ @cached_property
+ def presigned_url(self) -> PresignedURLResourceWithStreamingResponse:
+ return PresignedURLResourceWithStreamingResponse(self._storage.presigned_url)
+
+
+class AsyncStorageResourceWithStreamingResponse:
+ def __init__(self, storage: AsyncStorageResource) -> None:
+ self._storage = storage
+
+ @cached_property
+ def presigned_url(self) -> AsyncPresignedURLResourceWithStreamingResponse:
+ return AsyncPresignedURLResourceWithStreamingResponse(self._storage.presigned_url)
diff --git a/src/openlayer/types/storage/__init__.py b/src/openlayer/types/storage/__init__.py
new file mode 100644
index 00000000..1e6151a5
--- /dev/null
+++ b/src/openlayer/types/storage/__init__.py
@@ -0,0 +1,6 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .presigned_url_create_params import PresignedURLCreateParams as PresignedURLCreateParams
+from .presigned_url_create_response import PresignedURLCreateResponse as PresignedURLCreateResponse
diff --git a/src/openlayer/types/storage/presigned_url_create_params.py b/src/openlayer/types/storage/presigned_url_create_params.py
new file mode 100644
index 00000000..78af8cb5
--- /dev/null
+++ b/src/openlayer/types/storage/presigned_url_create_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["PresignedURLCreateParams"]
+
+
+class PresignedURLCreateParams(TypedDict, total=False):
+ object_name: Required[Annotated[str, PropertyInfo(alias="objectName")]]
+ """The name of the object."""
diff --git a/src/openlayer/types/storage/presigned_url_create_response.py b/src/openlayer/types/storage/presigned_url_create_response.py
new file mode 100644
index 00000000..71791bbf
--- /dev/null
+++ b/src/openlayer/types/storage/presigned_url_create_response.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["PresignedURLCreateResponse"]
+
+
+class PresignedURLCreateResponse(BaseModel):
+ storage_uri: str = FieldInfo(alias="storageUri")
+ """The storage URI to send back to the backend after the upload was completed."""
+
+ url: str
+ """The presigned url."""
+
+ fields: Optional[object] = None
+ """Fields to include in the body of the upload. Only needed by s3."""
diff --git a/tests/api_resources/storage/__init__.py b/tests/api_resources/storage/__init__.py
new file mode 100644
index 00000000..fd8019a9
--- /dev/null
+++ b/tests/api_resources/storage/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/storage/test_presigned_url.py b/tests/api_resources/storage/test_presigned_url.py
new file mode 100644
index 00000000..defedbfd
--- /dev/null
+++ b/tests/api_resources/storage/test_presigned_url.py
@@ -0,0 +1,84 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from openlayer import Openlayer, AsyncOpenlayer
+from tests.utils import assert_matches_type
+from openlayer.types.storage import PresignedURLCreateResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestPresignedURL:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Openlayer) -> None:
+ presigned_url = client.storage.presigned_url.create(
+ object_name="objectName",
+ )
+ assert_matches_type(PresignedURLCreateResponse, presigned_url, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Openlayer) -> None:
+ response = client.storage.presigned_url.with_raw_response.create(
+ object_name="objectName",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ presigned_url = response.parse()
+ assert_matches_type(PresignedURLCreateResponse, presigned_url, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Openlayer) -> None:
+ with client.storage.presigned_url.with_streaming_response.create(
+ object_name="objectName",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ presigned_url = response.parse()
+ assert_matches_type(PresignedURLCreateResponse, presigned_url, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncPresignedURL:
+ parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ async def test_method_create(self, async_client: AsyncOpenlayer) -> None:
+ presigned_url = await async_client.storage.presigned_url.create(
+ object_name="objectName",
+ )
+ assert_matches_type(PresignedURLCreateResponse, presigned_url, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncOpenlayer) -> None:
+ response = await async_client.storage.presigned_url.with_raw_response.create(
+ object_name="objectName",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ presigned_url = await response.parse()
+ assert_matches_type(PresignedURLCreateResponse, presigned_url, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncOpenlayer) -> None:
+ async with async_client.storage.presigned_url.with_streaming_response.create(
+ object_name="objectName",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ presigned_url = await response.parse()
+ assert_matches_type(PresignedURLCreateResponse, presigned_url, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
From e823ad72ec90992b251dd9d5ec9636f9634d0d5e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 22 Jul 2024 23:13:42 +0000
Subject: [PATCH 4/4] release: 0.2.0-alpha.11
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 14 ++++++++++++++
pyproject.toml | 2 +-
src/openlayer/_version.py | 2 +-
4 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 90c03660..55dc9a46 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.2.0-alpha.10"
+ ".": "0.2.0-alpha.11"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 265c6b3c..56b67895 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Removed
* Deprecated and removed `publish_ground_truths` method. Use `update_data` instead.
+## 0.2.0-alpha.11 (2024-07-22)
+
+Full Changelog: [v0.2.0-alpha.10...v0.2.0-alpha.11](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.10...v0.2.0-alpha.11)
+
+### Features
+
+* **api:** update via SDK Studio ([#270](https://github.com/openlayer-ai/openlayer-python/issues/270)) ([b5d333b](https://github.com/openlayer-ai/openlayer-python/commit/b5d333bc6c654cbe0d0952f949da0bfd9bc91cf4))
+
+
+### Chores
+
+* **internal:** refactor release doctor script ([#269](https://github.com/openlayer-ai/openlayer-python/issues/269)) ([11a5605](https://github.com/openlayer-ai/openlayer-python/commit/11a5605b48310b1bc9fa840865e375a74c93e55b))
+* **internal:** version bump ([#267](https://github.com/openlayer-ai/openlayer-python/issues/267)) ([932aac4](https://github.com/openlayer-ai/openlayer-python/commit/932aac43080f81ac5f5e3725f068bb4a628d8c88))
+
## 0.2.0-alpha.10 (2024-07-19)
Full Changelog: [v0.2.0-alpha.9...v0.2.0-alpha.10](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.9...v0.2.0-alpha.10)
diff --git a/pyproject.toml b/pyproject.toml
index 186ca923..4d247e86 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openlayer"
-version = "0.2.0-alpha.10"
+version = "0.2.0-alpha.11"
description = "The official Python library for the openlayer API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/openlayer/_version.py b/src/openlayer/_version.py
index 4789686c..01e3785e 100644
--- a/src/openlayer/_version.py
+++ b/src/openlayer/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "openlayer"
-__version__ = "0.2.0-alpha.10" # x-release-please-version
+__version__ = "0.2.0-alpha.11" # x-release-please-version