From 67dfb3e6cd1e11368ec1eb934f7004987014ec3c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 4 Feb 2025 08:51:57 +0000
Subject: [PATCH 1/3] chore: remove custom code
---
README.md | 29 +++---
api.md | 1 +
src/brainbase/_client.py | 24 +++--
src/brainbase/resources/workers/workers.py | 104 ++++++++++++++++++-
src/brainbase/types/__init__.py | 1 +
src/brainbase/types/worker_update_params.py | 15 +++
tests/api_resources/test_workers.py | 106 ++++++++++++++++++++
tests/test_client.py | 22 +++-
8 files changed, 278 insertions(+), 24 deletions(-)
create mode 100644 src/brainbase/types/worker_update_params.py
diff --git a/README.md b/README.md
index e5773a60..354cab72 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
## Documentation
-The REST API documentation can be found on [docs.usebrainbase.com](https://docs.usebrainbase.com). The full API of this library can be found in [api.md](api.md).
+The REST API documentation can be found on [docs.usebrainbase.xyz](https://docs.usebrainbase.xyz). The full API of this library can be found in [api.md](api.md).
## Installation
@@ -24,25 +24,32 @@ pip install brainbase-labs
The full API of this library can be found in [api.md](api.md).
```python
+import os
from brainbase import Brainbase
client = Brainbase(
- api_key="My API Key",
+ api_key=os.environ.get("BRAINBASE_API_KEY"), # This is the default and can be omitted
)
client.workers.list()
```
+While you can provide an `api_key` keyword argument,
+we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
+to add `BRAINBASE_API_KEY="My API Key"` to your `.env` file
+so that your API Key is not stored in source control.
+
## Async usage
Simply import `AsyncBrainbase` instead of `Brainbase` and use `await` with each API call:
```python
+import os
import asyncio
from brainbase import AsyncBrainbase
client = AsyncBrainbase(
- api_key="My API Key",
+ api_key=os.environ.get("BRAINBASE_API_KEY"), # This is the default and can be omitted
)
@@ -77,9 +84,7 @@ All errors inherit from `brainbase.APIError`.
import brainbase
from brainbase import Brainbase
-client = Brainbase(
- api_key="My API Key",
-)
+client = Brainbase()
try:
client.workers.list()
@@ -122,7 +127,6 @@ from brainbase import Brainbase
client = Brainbase(
# default is 2
max_retries=0,
- api_key="My API Key",
)
# Or, configure per-request:
@@ -141,13 +145,11 @@ from brainbase import Brainbase
client = Brainbase(
# 20 seconds (default is 1 minute)
timeout=20.0,
- api_key="My API Key",
)
# More granular control:
client = Brainbase(
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
- api_key="My API Key",
)
# Override per-request:
@@ -191,9 +193,7 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
```py
from brainbase import Brainbase
-client = Brainbase(
- api_key="My API Key",
-)
+client = Brainbase()
response = client.workers.with_raw_response.list()
print(response.headers.get('X-My-Header'))
@@ -274,7 +274,6 @@ client = Brainbase(
proxy="http://my.test.proxy.example.com",
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
),
- api_key="My API Key",
)
```
@@ -291,9 +290,7 @@ By default the library closes underlying HTTP connections whenever the client is
```py
from brainbase import Brainbase
-with Brainbase(
- api_key="My API Key",
-) as client:
+with Brainbase() as client:
# make requests here
...
diff --git a/api.md b/api.md
index 6f634335..4e25a402 100644
--- a/api.md
+++ b/api.md
@@ -4,6 +4,7 @@ Methods:
- client.workers.create(\*\*params) -> None
- client.workers.retrieve(id) -> None
+- client.workers.update(id, \*\*params) -> None
- client.workers.list() -> None
- client.workers.delete(id) -> None
diff --git a/src/brainbase/_client.py b/src/brainbase/_client.py
index ad7c930e..9192a946 100644
--- a/src/brainbase/_client.py
+++ b/src/brainbase/_client.py
@@ -78,13 +78,13 @@ def __init__(
) -> None:
"""Construct a new synchronous brainbase client instance.
- This automatically infers the `api_key` argument from the `API_KEY` environment variable if it is not provided.
+ This automatically infers the `api_key` argument from the `BRAINBASE_API_KEY` environment variable if it is not provided.
"""
if api_key is None:
- api_key = os.environ.get("API_KEY")
+ api_key = os.environ.get("BRAINBASE_API_KEY")
if api_key is None:
raise BrainbaseError(
- "The api_key client option must be set either by passing api_key to the client or by setting the API_KEY environment variable"
+ "The api_key client option must be set either by passing api_key to the client or by setting the BRAINBASE_API_KEY environment variable"
)
self.api_key = api_key
@@ -113,6 +113,12 @@ def __init__(
def qs(self) -> Querystring:
return Querystring(array_format="comma")
+ @property
+ @override
+ def auth_headers(self) -> dict[str, str]:
+ api_key = self.api_key
+ return {"x-api-key": api_key}
+
@property
@override
def default_headers(self) -> dict[str, str | Omit]:
@@ -240,13 +246,13 @@ def __init__(
) -> None:
"""Construct a new async brainbase client instance.
- This automatically infers the `api_key` argument from the `API_KEY` environment variable if it is not provided.
+ This automatically infers the `api_key` argument from the `BRAINBASE_API_KEY` environment variable if it is not provided.
"""
if api_key is None:
- api_key = os.environ.get("API_KEY")
+ api_key = os.environ.get("BRAINBASE_API_KEY")
if api_key is None:
raise BrainbaseError(
- "The api_key client option must be set either by passing api_key to the client or by setting the API_KEY environment variable"
+ "The api_key client option must be set either by passing api_key to the client or by setting the BRAINBASE_API_KEY environment variable"
)
self.api_key = api_key
@@ -275,6 +281,12 @@ def __init__(
def qs(self) -> Querystring:
return Querystring(array_format="comma")
+ @property
+ @override
+ def auth_headers(self) -> dict[str, str]:
+ api_key = self.api_key
+ return {"x-api-key": api_key}
+
@property
@override
def default_headers(self) -> dict[str, str | Omit]:
diff --git a/src/brainbase/resources/workers/workers.py b/src/brainbase/resources/workers/workers.py
index 9d2eb83c..323da4da 100644
--- a/src/brainbase/resources/workers/workers.py
+++ b/src/brainbase/resources/workers/workers.py
@@ -12,7 +12,7 @@
FlowsResourceWithStreamingResponse,
AsyncFlowsResourceWithStreamingResponse,
)
-from ...types import worker_create_params
+from ...types import worker_create_params, worker_update_params
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
from ..._utils import (
maybe_transform,
@@ -143,6 +143,51 @@ def retrieve(
cast_to=NoneType,
)
+ def update(
+ self,
+ id: str,
+ *,
+ description: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ status: str | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> None:
+ """
+ Update a worker
+
+ Args:
+ 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
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._post(
+ f"/api/workers/{id}",
+ body=maybe_transform(
+ {
+ "description": description,
+ "name": name,
+ "status": status,
+ },
+ worker_update_params.WorkerUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
def list(
self,
*,
@@ -302,6 +347,51 @@ async def retrieve(
cast_to=NoneType,
)
+ async def update(
+ self,
+ id: str,
+ *,
+ description: str | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
+ status: str | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> None:
+ """
+ Update a worker
+
+ Args:
+ 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
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._post(
+ f"/api/workers/{id}",
+ body=await async_maybe_transform(
+ {
+ "description": description,
+ "name": name,
+ "status": status,
+ },
+ worker_update_params.WorkerUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
async def list(
self,
*,
@@ -367,6 +457,9 @@ def __init__(self, workers: WorkersResource) -> None:
self.retrieve = to_raw_response_wrapper(
workers.retrieve,
)
+ self.update = to_raw_response_wrapper(
+ workers.update,
+ )
self.list = to_raw_response_wrapper(
workers.list,
)
@@ -393,6 +486,9 @@ def __init__(self, workers: AsyncWorkersResource) -> None:
self.retrieve = async_to_raw_response_wrapper(
workers.retrieve,
)
+ self.update = async_to_raw_response_wrapper(
+ workers.update,
+ )
self.list = async_to_raw_response_wrapper(
workers.list,
)
@@ -419,6 +515,9 @@ def __init__(self, workers: WorkersResource) -> None:
self.retrieve = to_streamed_response_wrapper(
workers.retrieve,
)
+ self.update = to_streamed_response_wrapper(
+ workers.update,
+ )
self.list = to_streamed_response_wrapper(
workers.list,
)
@@ -445,6 +544,9 @@ def __init__(self, workers: AsyncWorkersResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
workers.retrieve,
)
+ self.update = async_to_streamed_response_wrapper(
+ workers.update,
+ )
self.list = async_to_streamed_response_wrapper(
workers.list,
)
diff --git a/src/brainbase/types/__init__.py b/src/brainbase/types/__init__.py
index 5976bd7c..065250e2 100644
--- a/src/brainbase/types/__init__.py
+++ b/src/brainbase/types/__init__.py
@@ -3,3 +3,4 @@
from __future__ import annotations
from .worker_create_params import WorkerCreateParams as WorkerCreateParams
+from .worker_update_params import WorkerUpdateParams as WorkerUpdateParams
diff --git a/src/brainbase/types/worker_update_params.py b/src/brainbase/types/worker_update_params.py
new file mode 100644
index 00000000..bfa7a019
--- /dev/null
+++ b/src/brainbase/types/worker_update_params.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["WorkerUpdateParams"]
+
+
+class WorkerUpdateParams(TypedDict, total=False):
+ description: str
+
+ name: str
+
+ status: str
diff --git a/tests/api_resources/test_workers.py b/tests/api_resources/test_workers.py
index 5f524f47..2a9a36aa 100644
--- a/tests/api_resources/test_workers.py
+++ b/tests/api_resources/test_workers.py
@@ -101,6 +101,59 @@ def test_path_params_retrieve(self, client: Brainbase) -> None:
"",
)
+ @pytest.mark.skip()
+ @parametrize
+ def test_method_update(self, client: Brainbase) -> None:
+ worker = client.workers.update(
+ id="id",
+ )
+ assert worker is None
+
+ @pytest.mark.skip()
+ @parametrize
+ def test_method_update_with_all_params(self, client: Brainbase) -> None:
+ worker = client.workers.update(
+ id="id",
+ description="description",
+ name="name",
+ status="status",
+ )
+ assert worker is None
+
+ @pytest.mark.skip()
+ @parametrize
+ def test_raw_response_update(self, client: Brainbase) -> None:
+ response = client.workers.with_raw_response.update(
+ id="id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ worker = response.parse()
+ assert worker is None
+
+ @pytest.mark.skip()
+ @parametrize
+ def test_streaming_response_update(self, client: Brainbase) -> None:
+ with client.workers.with_streaming_response.update(
+ id="id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ worker = response.parse()
+ assert worker is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip()
+ @parametrize
+ def test_path_params_update(self, client: Brainbase) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.workers.with_raw_response.update(
+ id="",
+ )
+
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Brainbase) -> None:
@@ -261,6 +314,59 @@ async def test_path_params_retrieve(self, async_client: AsyncBrainbase) -> None:
"",
)
+ @pytest.mark.skip()
+ @parametrize
+ async def test_method_update(self, async_client: AsyncBrainbase) -> None:
+ worker = await async_client.workers.update(
+ id="id",
+ )
+ assert worker is None
+
+ @pytest.mark.skip()
+ @parametrize
+ async def test_method_update_with_all_params(self, async_client: AsyncBrainbase) -> None:
+ worker = await async_client.workers.update(
+ id="id",
+ description="description",
+ name="name",
+ status="status",
+ )
+ assert worker is None
+
+ @pytest.mark.skip()
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncBrainbase) -> None:
+ response = await async_client.workers.with_raw_response.update(
+ id="id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ worker = await response.parse()
+ assert worker is None
+
+ @pytest.mark.skip()
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncBrainbase) -> None:
+ async with async_client.workers.with_streaming_response.update(
+ id="id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ worker = await response.parse()
+ assert worker is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip()
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncBrainbase) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.workers.with_raw_response.update(
+ id="",
+ )
+
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncBrainbase) -> None:
diff --git a/tests/test_client.py b/tests/test_client.py
index c4074ec6..4bf71630 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -25,7 +25,7 @@
from brainbase._types import Omit
from brainbase._models import BaseModel, FinalRequestOptions
from brainbase._constants import RAW_RESPONSE_HEADER
-from brainbase._exceptions import APIStatusError, APITimeoutError, APIResponseValidationError
+from brainbase._exceptions import APIStatusError, BrainbaseError, APITimeoutError, APIResponseValidationError
from brainbase._base_client import (
DEFAULT_TIMEOUT,
HTTPX_DEFAULT_TIMEOUT,
@@ -334,6 +334,16 @@ def test_default_headers_option(self) -> None:
assert request.headers.get("x-foo") == "stainless"
assert request.headers.get("x-stainless-lang") == "my-overriding-header"
+ def test_validate_headers(self) -> None:
+ client = Brainbase(base_url=base_url, api_key=api_key, _strict_response_validation=True)
+ request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
+ assert request.headers.get("x-api-key") == api_key
+
+ with pytest.raises(BrainbaseError):
+ with update_env(**{"BRAINBASE_API_KEY": Omit()}):
+ client2 = Brainbase(base_url=base_url, api_key=None, _strict_response_validation=True)
+ _ = client2
+
def test_default_query_option(self) -> None:
client = Brainbase(
base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"query_param": "bar"}
@@ -1080,6 +1090,16 @@ def test_default_headers_option(self) -> None:
assert request.headers.get("x-foo") == "stainless"
assert request.headers.get("x-stainless-lang") == "my-overriding-header"
+ def test_validate_headers(self) -> None:
+ client = AsyncBrainbase(base_url=base_url, api_key=api_key, _strict_response_validation=True)
+ request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
+ assert request.headers.get("x-api-key") == api_key
+
+ with pytest.raises(BrainbaseError):
+ with update_env(**{"BRAINBASE_API_KEY": Omit()}):
+ client2 = AsyncBrainbase(base_url=base_url, api_key=None, _strict_response_validation=True)
+ _ = client2
+
def test_default_query_option(self) -> None:
client = AsyncBrainbase(
base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"query_param": "bar"}
From 1a43ad3644983ec2d83f2ed24e87142cf7088c28 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 4 Feb 2025 08:54:15 +0000
Subject: [PATCH 2/3] feat(api): update via SDK Studio (#33)
---
.stats.yml | 2 +-
README.md | 29 ++++++++++++++++-------------
src/brainbase/_client.py | 12 ------------
tests/test_client.py | 22 +---------------------
4 files changed, 18 insertions(+), 47 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 571d6bb0..681b4257 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 15
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brainbase-egrigokhan%2Fbrainbase-0c00485d66a3b7505f3247467ef293fa5fb43a64e90a8b03a4127a2d9b15e6ab.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brainbase-egrigokhan%2Fbrainbase-a197a88d1abbdbd5c886875d2cf12ffd6abf79aec7d4dbd0439ed50197692eba.yml
diff --git a/README.md b/README.md
index 354cab72..0868a8cb 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
## Documentation
-The REST API documentation can be found on [docs.usebrainbase.xyz](https://docs.usebrainbase.xyz). The full API of this library can be found in [api.md](api.md).
+The REST API documentation can be found on [docs.brainbase.com](https://docs.brainbase.com). The full API of this library can be found in [api.md](api.md).
## Installation
@@ -24,32 +24,25 @@ pip install brainbase-labs
The full API of this library can be found in [api.md](api.md).
```python
-import os
from brainbase import Brainbase
client = Brainbase(
- api_key=os.environ.get("BRAINBASE_API_KEY"), # This is the default and can be omitted
+ api_key="My API Key",
)
client.workers.list()
```
-While you can provide an `api_key` keyword argument,
-we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
-to add `BRAINBASE_API_KEY="My API Key"` to your `.env` file
-so that your API Key is not stored in source control.
-
## Async usage
Simply import `AsyncBrainbase` instead of `Brainbase` and use `await` with each API call:
```python
-import os
import asyncio
from brainbase import AsyncBrainbase
client = AsyncBrainbase(
- api_key=os.environ.get("BRAINBASE_API_KEY"), # This is the default and can be omitted
+ api_key="My API Key",
)
@@ -84,7 +77,9 @@ All errors inherit from `brainbase.APIError`.
import brainbase
from brainbase import Brainbase
-client = Brainbase()
+client = Brainbase(
+ api_key="My API Key",
+)
try:
client.workers.list()
@@ -127,6 +122,7 @@ from brainbase import Brainbase
client = Brainbase(
# default is 2
max_retries=0,
+ api_key="My API Key",
)
# Or, configure per-request:
@@ -145,11 +141,13 @@ from brainbase import Brainbase
client = Brainbase(
# 20 seconds (default is 1 minute)
timeout=20.0,
+ api_key="My API Key",
)
# More granular control:
client = Brainbase(
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
+ api_key="My API Key",
)
# Override per-request:
@@ -193,7 +191,9 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
```py
from brainbase import Brainbase
-client = Brainbase()
+client = Brainbase(
+ api_key="My API Key",
+)
response = client.workers.with_raw_response.list()
print(response.headers.get('X-My-Header'))
@@ -274,6 +274,7 @@ client = Brainbase(
proxy="http://my.test.proxy.example.com",
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
),
+ api_key="My API Key",
)
```
@@ -290,7 +291,9 @@ By default the library closes underlying HTTP connections whenever the client is
```py
from brainbase import Brainbase
-with Brainbase() as client:
+with Brainbase(
+ api_key="My API Key",
+) as client:
# make requests here
...
diff --git a/src/brainbase/_client.py b/src/brainbase/_client.py
index 9192a946..bbe9a56d 100644
--- a/src/brainbase/_client.py
+++ b/src/brainbase/_client.py
@@ -113,12 +113,6 @@ def __init__(
def qs(self) -> Querystring:
return Querystring(array_format="comma")
- @property
- @override
- def auth_headers(self) -> dict[str, str]:
- api_key = self.api_key
- return {"x-api-key": api_key}
-
@property
@override
def default_headers(self) -> dict[str, str | Omit]:
@@ -281,12 +275,6 @@ def __init__(
def qs(self) -> Querystring:
return Querystring(array_format="comma")
- @property
- @override
- def auth_headers(self) -> dict[str, str]:
- api_key = self.api_key
- return {"x-api-key": api_key}
-
@property
@override
def default_headers(self) -> dict[str, str | Omit]:
diff --git a/tests/test_client.py b/tests/test_client.py
index 4bf71630..c4074ec6 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -25,7 +25,7 @@
from brainbase._types import Omit
from brainbase._models import BaseModel, FinalRequestOptions
from brainbase._constants import RAW_RESPONSE_HEADER
-from brainbase._exceptions import APIStatusError, BrainbaseError, APITimeoutError, APIResponseValidationError
+from brainbase._exceptions import APIStatusError, APITimeoutError, APIResponseValidationError
from brainbase._base_client import (
DEFAULT_TIMEOUT,
HTTPX_DEFAULT_TIMEOUT,
@@ -334,16 +334,6 @@ def test_default_headers_option(self) -> None:
assert request.headers.get("x-foo") == "stainless"
assert request.headers.get("x-stainless-lang") == "my-overriding-header"
- def test_validate_headers(self) -> None:
- client = Brainbase(base_url=base_url, api_key=api_key, _strict_response_validation=True)
- request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
- assert request.headers.get("x-api-key") == api_key
-
- with pytest.raises(BrainbaseError):
- with update_env(**{"BRAINBASE_API_KEY": Omit()}):
- client2 = Brainbase(base_url=base_url, api_key=None, _strict_response_validation=True)
- _ = client2
-
def test_default_query_option(self) -> None:
client = Brainbase(
base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"query_param": "bar"}
@@ -1090,16 +1080,6 @@ def test_default_headers_option(self) -> None:
assert request.headers.get("x-foo") == "stainless"
assert request.headers.get("x-stainless-lang") == "my-overriding-header"
- def test_validate_headers(self) -> None:
- client = AsyncBrainbase(base_url=base_url, api_key=api_key, _strict_response_validation=True)
- request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
- assert request.headers.get("x-api-key") == api_key
-
- with pytest.raises(BrainbaseError):
- with update_env(**{"BRAINBASE_API_KEY": Omit()}):
- client2 = AsyncBrainbase(base_url=base_url, api_key=None, _strict_response_validation=True)
- _ = client2
-
def test_default_query_option(self) -> None:
client = AsyncBrainbase(
base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"query_param": "bar"}
From 6a34051ba5280128d24ba5c8b2f66d180c48b022 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 4 Feb 2025 08:54:34 +0000
Subject: [PATCH 3/3] release: 1.7.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 13 +++++++++++++
pyproject.toml | 2 +-
src/brainbase/_version.py | 2 +-
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 7deae338..cce9d1c6 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "1.6.0"
+ ".": "1.7.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 37e6362e..8b0d6c72 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog
+## 1.7.0 (2025-02-04)
+
+Full Changelog: [v1.6.0...v1.7.0](https://github.com/BrainbaseHQ/brainbase-python-sdk/compare/v1.6.0...v1.7.0)
+
+### Features
+
+* **api:** update via SDK Studio ([#33](https://github.com/BrainbaseHQ/brainbase-python-sdk/issues/33)) ([1a43ad3](https://github.com/BrainbaseHQ/brainbase-python-sdk/commit/1a43ad3644983ec2d83f2ed24e87142cf7088c28))
+
+
+### Chores
+
+* remove custom code ([67dfb3e](https://github.com/BrainbaseHQ/brainbase-python-sdk/commit/67dfb3e6cd1e11368ec1eb934f7004987014ec3c))
+
## 1.6.0 (2025-02-04)
Full Changelog: [v1.5.0...v1.6.0](https://github.com/BrainbaseHQ/brainbase-python-sdk/compare/v1.5.0...v1.6.0)
diff --git a/pyproject.toml b/pyproject.toml
index 43a575b1..7171cda0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "brainbase-labs"
-version = "1.6.0"
+version = "1.7.0"
description = "The official Python library for the brainbase API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/brainbase/_version.py b/src/brainbase/_version.py
index 6f3c736e..f17fa6d4 100644
--- a/src/brainbase/_version.py
+++ b/src/brainbase/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "brainbase"
-__version__ = "1.6.0" # x-release-please-version
+__version__ = "1.7.0" # x-release-please-version