Skip to content

Commit 15571e4

Browse files
authored
Merge pull request #33 from brand-dot-dev/release-please--branches--main--changes--next
release: 1.27.0
2 parents 287f1e8 + dd51e11 commit 15571e4

File tree

14 files changed

+362
-31
lines changed

14 files changed

+362
-31
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.26.0"
2+
".": "1.27.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 13
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-849e1b7b4e2aeff45d6762768c497da63f605cb80fdbfc0207f7e7555b994b5a.yml
3-
openapi_spec_hash: 9d2ef7a402cb9eaa80cbae645aa8d2f0
4-
config_hash: 6aaf0fe6f8877c9c5d9af95597123cb4
1+
configured_endpoints: 14
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-1391c1e69bcdce517f71265a2f22f4e8d35c3f12a224899e64f85e25897b743a.yml
3+
openapi_spec_hash: f8a2917cc425300d272ae943f88d7bb7
4+
config_hash: 7f48d078645cb8331328bcd6f6ab3281

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## 1.27.0 (2025-12-22)
4+
5+
Full Changelog: [v1.26.0...v1.27.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.26.0...v1.27.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([17cbb91](https://github.com/brand-dot-dev/python-sdk/commit/17cbb910aa48e07ced617793793165219952444f))
10+
11+
12+
### Bug Fixes
13+
14+
* use async_to_httpx_files in patch method ([cfd96a1](https://github.com/brand-dot-dev/python-sdk/commit/cfd96a1560076b2db2bdb36556f3546a06b4ad91))
15+
16+
17+
### Chores
18+
19+
* **internal:** add missing files argument to base client ([a0aab9c](https://github.com/brand-dot-dev/python-sdk/commit/a0aab9cdf8e231a1c1e0177484944f04af00aeaa))
20+
* **internal:** codegen related update ([67b3cdd](https://github.com/brand-dot-dev/python-sdk/commit/67b3cdd7dbc80aa0195894c80c3ca2636f689cf7))
21+
* speedup initial import ([995537f](https://github.com/brand-dot-dev/python-sdk/commit/995537fa33a6c193350c3d730505591a700a3af5))
22+
323
## 1.26.0 (2025-12-14)
424

525
Full Changelog: [v1.25.0...v1.26.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.25.0...v1.26.0)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ from brand.dev.types import (
99
BrandFontsResponse,
1010
BrandIdentifyFromTransactionResponse,
1111
BrandPrefetchResponse,
12+
BrandPrefetchByEmailResponse,
1213
BrandRetrieveByEmailResponse,
1314
BrandRetrieveByIsinResponse,
1415
BrandRetrieveByNameResponse,
@@ -27,6 +28,7 @@ Methods:
2728
- <code title="get /brand/fonts">client.brand.<a href="./src/brand/dev/resources/brand.py">fonts</a>(\*\*<a href="src/brand/dev/types/brand_fonts_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_fonts_response.py">BrandFontsResponse</a></code>
2829
- <code title="get /brand/transaction_identifier">client.brand.<a href="./src/brand/dev/resources/brand.py">identify_from_transaction</a>(\*\*<a href="src/brand/dev/types/brand_identify_from_transaction_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_identify_from_transaction_response.py">BrandIdentifyFromTransactionResponse</a></code>
2930
- <code title="post /brand/prefetch">client.brand.<a href="./src/brand/dev/resources/brand.py">prefetch</a>(\*\*<a href="src/brand/dev/types/brand_prefetch_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_prefetch_response.py">BrandPrefetchResponse</a></code>
31+
- <code title="post /brand/prefetch-by-email">client.brand.<a href="./src/brand/dev/resources/brand.py">prefetch_by_email</a>(\*\*<a href="src/brand/dev/types/brand_prefetch_by_email_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_prefetch_by_email_response.py">BrandPrefetchByEmailResponse</a></code>
3032
- <code title="get /brand/retrieve-by-email">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve_by_email</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_by_email_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_by_email_response.py">BrandRetrieveByEmailResponse</a></code>
3133
- <code title="get /brand/retrieve-by-isin">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve_by_isin</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_by_isin_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_by_isin_response.py">BrandRetrieveByIsinResponse</a></code>
3234
- <code title="get /brand/retrieve-by-name">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve_by_name</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_by_name_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_by_name_response.py">BrandRetrieveByNameResponse</a></code>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "brand.dev"
3-
version = "1.26.0"
3+
version = "1.27.0"
44
description = "The official Python library for the brand.dev API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

scripts/lint

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
echo "==> Running lints"
8-
rye run lint
7+
if [ "$1" = "--fix" ]; then
8+
echo "==> Running lints with --fix"
9+
rye run fix:ruff
10+
else
11+
echo "==> Running lints"
12+
rye run lint
13+
fi
914

1015
echo "==> Making sure it imports"
1116
rye run python -c 'import brand.dev'

src/brand/dev/_base_client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,9 +1247,12 @@ def patch(
12471247
*,
12481248
cast_to: Type[ResponseT],
12491249
body: Body | None = None,
1250+
files: RequestFiles | None = None,
12501251
options: RequestOptions = {},
12511252
) -> ResponseT:
1252-
opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
1253+
opts = FinalRequestOptions.construct(
1254+
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
1255+
)
12531256
return self.request(cast_to, opts)
12541257

12551258
def put(
@@ -1767,9 +1770,12 @@ async def patch(
17671770
*,
17681771
cast_to: Type[ResponseT],
17691772
body: Body | None = None,
1773+
files: RequestFiles | None = None,
17701774
options: RequestOptions = {},
17711775
) -> ResponseT:
1772-
opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
1776+
opts = FinalRequestOptions.construct(
1777+
method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
1778+
)
17731779
return await self.request(cast_to, opts)
17741780

17751781
async def put(

src/brand/dev/_client.py

Lines changed: 68 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
import os
6-
from typing import Any, Mapping
6+
from typing import TYPE_CHECKING, Any, Mapping
77
from typing_extensions import Self, override
88

99
import httpx
@@ -20,8 +20,8 @@
2020
not_given,
2121
)
2222
from ._utils import is_given, get_async_library
23+
from ._compat import cached_property
2324
from ._version import __version__
24-
from .resources import brand
2525
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
2626
from ._exceptions import BrandDevError, APIStatusError
2727
from ._base_client import (
@@ -30,6 +30,10 @@
3030
AsyncAPIClient,
3131
)
3232

33+
if TYPE_CHECKING:
34+
from .resources import brand
35+
from .resources.brand import BrandResource, AsyncBrandResource
36+
3337
__all__ = [
3438
"Timeout",
3539
"Transport",
@@ -43,10 +47,6 @@
4347

4448

4549
class BrandDev(SyncAPIClient):
46-
brand: brand.BrandResource
47-
with_raw_response: BrandDevWithRawResponse
48-
with_streaming_response: BrandDevWithStreamedResponse
49-
5050
# client options
5151
api_key: str
5252

@@ -101,9 +101,19 @@ def __init__(
101101
_strict_response_validation=_strict_response_validation,
102102
)
103103

104-
self.brand = brand.BrandResource(self)
105-
self.with_raw_response = BrandDevWithRawResponse(self)
106-
self.with_streaming_response = BrandDevWithStreamedResponse(self)
104+
@cached_property
105+
def brand(self) -> BrandResource:
106+
from .resources.brand import BrandResource
107+
108+
return BrandResource(self)
109+
110+
@cached_property
111+
def with_raw_response(self) -> BrandDevWithRawResponse:
112+
return BrandDevWithRawResponse(self)
113+
114+
@cached_property
115+
def with_streaming_response(self) -> BrandDevWithStreamedResponse:
116+
return BrandDevWithStreamedResponse(self)
107117

108118
@property
109119
@override
@@ -211,10 +221,6 @@ def _make_status_error(
211221

212222

213223
class AsyncBrandDev(AsyncAPIClient):
214-
brand: brand.AsyncBrandResource
215-
with_raw_response: AsyncBrandDevWithRawResponse
216-
with_streaming_response: AsyncBrandDevWithStreamedResponse
217-
218224
# client options
219225
api_key: str
220226

@@ -269,9 +275,19 @@ def __init__(
269275
_strict_response_validation=_strict_response_validation,
270276
)
271277

272-
self.brand = brand.AsyncBrandResource(self)
273-
self.with_raw_response = AsyncBrandDevWithRawResponse(self)
274-
self.with_streaming_response = AsyncBrandDevWithStreamedResponse(self)
278+
@cached_property
279+
def brand(self) -> AsyncBrandResource:
280+
from .resources.brand import AsyncBrandResource
281+
282+
return AsyncBrandResource(self)
283+
284+
@cached_property
285+
def with_raw_response(self) -> AsyncBrandDevWithRawResponse:
286+
return AsyncBrandDevWithRawResponse(self)
287+
288+
@cached_property
289+
def with_streaming_response(self) -> AsyncBrandDevWithStreamedResponse:
290+
return AsyncBrandDevWithStreamedResponse(self)
275291

276292
@property
277293
@override
@@ -379,23 +395,55 @@ def _make_status_error(
379395

380396

381397
class BrandDevWithRawResponse:
398+
_client: BrandDev
399+
382400
def __init__(self, client: BrandDev) -> None:
383-
self.brand = brand.BrandResourceWithRawResponse(client.brand)
401+
self._client = client
402+
403+
@cached_property
404+
def brand(self) -> brand.BrandResourceWithRawResponse:
405+
from .resources.brand import BrandResourceWithRawResponse
406+
407+
return BrandResourceWithRawResponse(self._client.brand)
384408

385409

386410
class AsyncBrandDevWithRawResponse:
411+
_client: AsyncBrandDev
412+
387413
def __init__(self, client: AsyncBrandDev) -> None:
388-
self.brand = brand.AsyncBrandResourceWithRawResponse(client.brand)
414+
self._client = client
415+
416+
@cached_property
417+
def brand(self) -> brand.AsyncBrandResourceWithRawResponse:
418+
from .resources.brand import AsyncBrandResourceWithRawResponse
419+
420+
return AsyncBrandResourceWithRawResponse(self._client.brand)
389421

390422

391423
class BrandDevWithStreamedResponse:
424+
_client: BrandDev
425+
392426
def __init__(self, client: BrandDev) -> None:
393-
self.brand = brand.BrandResourceWithStreamingResponse(client.brand)
427+
self._client = client
428+
429+
@cached_property
430+
def brand(self) -> brand.BrandResourceWithStreamingResponse:
431+
from .resources.brand import BrandResourceWithStreamingResponse
432+
433+
return BrandResourceWithStreamingResponse(self._client.brand)
394434

395435

396436
class AsyncBrandDevWithStreamedResponse:
437+
_client: AsyncBrandDev
438+
397439
def __init__(self, client: AsyncBrandDev) -> None:
398-
self.brand = brand.AsyncBrandResourceWithStreamingResponse(client.brand)
440+
self._client = client
441+
442+
@cached_property
443+
def brand(self) -> brand.AsyncBrandResourceWithStreamingResponse:
444+
from .resources.brand import AsyncBrandResourceWithStreamingResponse
445+
446+
return AsyncBrandResourceWithStreamingResponse(self._client.brand)
399447

400448

401449
Client = BrandDev

src/brand/dev/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "brand.dev"
4-
__version__ = "1.26.0" # x-release-please-version
4+
__version__ = "1.27.0" # x-release-please-version

0 commit comments

Comments
 (0)