Skip to content

Commit 49910dc

Browse files
authored
Merge pull request #8 from brand-dot-dev/release-please--branches--main--changes--next
release: 1.6.0
2 parents 52f437e + 19a3c08 commit 49910dc

21 files changed

Lines changed: 1256 additions & 31 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- 'integrated/**'
88
- 'stl-preview-head/**'
99
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
1014

1115
jobs:
1216
lint:

.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.5.0"
2+
".": "1.6.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: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-a960d67a89f2e62fcb3fb61f13e0cba71a803ff00b378730cf72a8209ae8e36a.yml
3-
openapi_spec_hash: a2c7aa9e4b1e5265d502d3f005ffb5f9
4-
config_hash: bb3f3ba0dca413263e40968648f9a1a6
1+
configured_endpoints: 10
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-3f6d4c0f819a0d3128951d315ad216df22050fbc47c5f601d261d56f8b1d80a5.yml
3+
openapi_spec_hash: 8e7953259a1b6bd7440a780eccad1742
4+
config_hash: 8f3ee44d690a305369555016a77ed016

CHANGELOG.md

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

3+
## 1.6.0 (2025-06-19)
4+
5+
Full Changelog: [v1.5.0...v1.6.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.5.0...v1.6.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([315c5dc](https://github.com/brand-dot-dev/python-sdk/commit/315c5dcb1aa4982bf5e90b3fbe1223c969234a64))
10+
* **api:** manual updates ([adc4bd6](https://github.com/brand-dot-dev/python-sdk/commit/adc4bd6260c7bc6471fa060b66c1f3e8f368bf07))
11+
12+
13+
### Bug Fixes
14+
15+
* **client:** correctly parse binary response | stream ([26be0c4](https://github.com/brand-dot-dev/python-sdk/commit/26be0c417636a9be6f5b52fd079038b3eeb11484))
16+
* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([b2bff71](https://github.com/brand-dot-dev/python-sdk/commit/b2bff712704ec48751c0b2ea4f51960913811a98))
17+
18+
19+
### Chores
20+
21+
* **ci:** enable for pull requests ([d908899](https://github.com/brand-dot-dev/python-sdk/commit/d9088990a6b2e760d1a425117848697882a2b5bd))
22+
* **internal:** update conftest.py ([fd16274](https://github.com/brand-dot-dev/python-sdk/commit/fd16274f9eb87fac48f5d746e628f135f98ff052))
23+
* **readme:** update badges ([727b0fa](https://github.com/brand-dot-dev/python-sdk/commit/727b0fa230d8a40abbd1e36e592ba3ba05b6f8eb))
24+
* **tests:** add tests for httpx client instantiation & proxies ([bb70721](https://github.com/brand-dot-dev/python-sdk/commit/bb70721dd5ac47752cc749ac9269eb4e7d1bb6d4))
25+
* **tests:** run tests in parallel ([b12584c](https://github.com/brand-dot-dev/python-sdk/commit/b12584c87749c3a9e06653418a9e3365f80cfee0))
26+
27+
28+
### Documentation
29+
30+
* **client:** fix httpx.Timeout documentation reference ([05629cf](https://github.com/brand-dot-dev/python-sdk/commit/05629cf3a6cef8bf5b65aa4df60528e313883a7b))
31+
332
## 1.5.0 (2025-06-08)
433

534
Full Changelog: [v1.4.0...v1.5.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.4.0...v1.5.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Brand Dev Python API library
22

3-
[![PyPI version](https://img.shields.io/pypi/v/brand.dev.svg)](https://pypi.org/project/brand.dev/)
3+
[![PyPI version](<https://img.shields.io/pypi/v/brand.dev.svg?label=pypi%20(stable)>)](https://pypi.org/project/brand.dev/)
44

55
The Brand Dev Python library provides convenient access to the Brand Dev REST API from any Python 3.8+
66
application. The library includes type definitions for all request params and response fields,
@@ -170,7 +170,7 @@ client.with_options(max_retries=5).brand.retrieve(
170170
### Timeouts
171171

172172
By default requests time out after 1 minute. You can configure this with a `timeout` option,
173-
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
173+
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
174174

175175
```python
176176
from brand.dev import BrandDev

api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ from brand.dev.types import (
1010
BrandPrefetchResponse,
1111
BrandRetrieveByTickerResponse,
1212
BrandRetrieveNaicsResponse,
13+
BrandRetrieveSimplifiedResponse,
14+
BrandScreenshotResponse,
1315
BrandSearchResponse,
16+
BrandStyleguideResponse,
1417
)
1518
```
1619

@@ -22,4 +25,7 @@ Methods:
2225
- <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>
2326
- <code title="get /brand/retrieve-by-ticker">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve_by_ticker</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_by_ticker_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_by_ticker_response.py">BrandRetrieveByTickerResponse</a></code>
2427
- <code title="get /brand/naics">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve_naics</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_naics_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_naics_response.py">BrandRetrieveNaicsResponse</a></code>
28+
- <code title="get /brand/retrieve-simplified">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve_simplified</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_simplified_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_simplified_response.py">BrandRetrieveSimplifiedResponse</a></code>
29+
- <code title="get /brand/screenshot">client.brand.<a href="./src/brand/dev/resources/brand.py">screenshot</a>(\*\*<a href="src/brand/dev/types/brand_screenshot_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_screenshot_response.py">BrandScreenshotResponse</a></code>
2530
- <code title="get /brand/search">client.brand.<a href="./src/brand/dev/resources/brand.py">search</a>(\*\*<a href="src/brand/dev/types/brand_search_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_search_response.py">BrandSearchResponse</a></code>
31+
- <code title="get /brand/styleguide">client.brand.<a href="./src/brand/dev/resources/brand.py">styleguide</a>(\*\*<a href="src/brand/dev/types/brand_styleguide_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_styleguide_response.py">BrandStyleguideResponse</a></code>

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "brand.dev"
3-
version = "1.5.0"
3+
version = "1.6.0"
44
description = "The official Python library for the brand.dev API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -54,6 +54,7 @@ dev-dependencies = [
5454
"importlib-metadata>=6.7.0",
5555
"rich>=13.7.1",
5656
"nest_asyncio==1.6.0",
57+
"pytest-xdist>=3.6.1",
5758
]
5859

5960
[tool.rye.scripts]
@@ -125,7 +126,7 @@ replacement = '[\1](https://github.com/brand-dot-dev/python-sdk/tree/main/\g<2>)
125126

126127
[tool.pytest.ini_options]
127128
testpaths = ["tests"]
128-
addopts = "--tb=short"
129+
addopts = "--tb=short -n auto"
129130
xfail_strict = true
130131
asyncio_mode = "auto"
131132
asyncio_default_fixture_loop_scope = "session"

requirements-dev.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ distro==1.8.0
3030
exceptiongroup==1.2.2
3131
# via anyio
3232
# via pytest
33+
execnet==2.1.1
34+
# via pytest-xdist
3335
filelock==3.12.4
3436
# via virtualenv
3537
h11==0.14.0
@@ -72,7 +74,9 @@ pygments==2.18.0
7274
pyright==1.1.399
7375
pytest==8.3.3
7476
# via pytest-asyncio
77+
# via pytest-xdist
7578
pytest-asyncio==0.24.0
79+
pytest-xdist==3.7.0
7680
python-dateutil==2.8.2
7781
# via time-machine
7882
pytz==2023.3.post1

src/brand/dev/_base_client.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,14 @@ def _process_response(
10711071
) -> ResponseT:
10721072
origin = get_origin(cast_to) or cast_to
10731073

1074-
if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse):
1074+
if (
1075+
inspect.isclass(origin)
1076+
and issubclass(origin, BaseAPIResponse)
1077+
# we only want to actually return the custom BaseAPIResponse class if we're
1078+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
1079+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
1080+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
1081+
):
10751082
if not issubclass(origin, APIResponse):
10761083
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
10771084

@@ -1574,7 +1581,14 @@ async def _process_response(
15741581
) -> ResponseT:
15751582
origin = get_origin(cast_to) or cast_to
15761583

1577-
if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse):
1584+
if (
1585+
inspect.isclass(origin)
1586+
and issubclass(origin, BaseAPIResponse)
1587+
# we only want to actually return the custom BaseAPIResponse class if we're
1588+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
1589+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
1590+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
1591+
):
15781592
if not issubclass(origin, AsyncAPIResponse):
15791593
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
15801594

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.5.0" # x-release-please-version
4+
__version__ = "1.6.0" # x-release-please-version

0 commit comments

Comments
 (0)