Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
a142654
codegen metadata
stainless-app[bot] Apr 4, 2026
9213463
feat(api): api update
stainless-app[bot] Apr 5, 2026
a388d39
feat(api): api update
stainless-app[bot] Apr 5, 2026
a92d7b7
fix(client): preserve hardcoded query params when merging with user p…
stainless-app[bot] Apr 8, 2026
bd0f93f
feat(api): api update
stainless-app[bot] Apr 9, 2026
9b72a51
fix: ensure file data are only sent as 1 parameter
stainless-app[bot] Apr 11, 2026
7d2dd3b
codegen metadata
stainless-app[bot] Apr 12, 2026
721f3b4
codegen metadata
stainless-app[bot] Apr 12, 2026
223fdb8
codegen metadata
stainless-app[bot] Apr 12, 2026
4077db3
codegen metadata
stainless-app[bot] Apr 12, 2026
04fafa1
feat(api): api update
stainless-app[bot] Apr 16, 2026
b5e8905
feat(api): api update
stainless-app[bot] Apr 17, 2026
bf48ceb
feat(api): api update
stainless-app[bot] Apr 17, 2026
93a9472
feat(api): api update
stainless-app[bot] Apr 17, 2026
1c9099a
codegen metadata
stainless-app[bot] Apr 17, 2026
f13cc2b
feat(api): api update
stainless-app[bot] Apr 17, 2026
23171da
codegen metadata
stainless-app[bot] Apr 17, 2026
2116fb9
codegen metadata
stainless-app[bot] Apr 17, 2026
9d4a64e
feat(api): api update
stainless-app[bot] Apr 17, 2026
af4c2fa
feat(api): api update
stainless-app[bot] Apr 17, 2026
b494e66
feat(api): api update
stainless-app[bot] Apr 17, 2026
b4672ab
feat(api): api update
stainless-app[bot] Apr 17, 2026
a04e938
feat(api): api update
stainless-app[bot] Apr 18, 2026
1849fc5
codegen metadata
stainless-app[bot] Apr 18, 2026
d7e4a18
perf(client): optimize file structure copying in multipart requests
stainless-app[bot] Apr 18, 2026
76936a9
codegen metadata
stainless-app[bot] Apr 19, 2026
74f22a5
feat(api): api update
stainless-app[bot] Apr 19, 2026
cd71a25
codegen metadata
stainless-app[bot] Apr 21, 2026
28007d9
chore(internal): more robust bootstrap script
stainless-app[bot] Apr 23, 2026
5c2e885
codegen metadata
stainless-app[bot] Apr 23, 2026
390e85c
feat(api): api update
stainless-app[bot] Apr 24, 2026
f9047c7
feat(api): api update
stainless-app[bot] Apr 24, 2026
3e783d9
feat(api): api update
stainless-app[bot] Apr 24, 2026
f0e8b85
codegen metadata
stainless-app[bot] Apr 25, 2026
9ac7adc
codegen metadata
stainless-app[bot] Apr 25, 2026
e4f1307
feat(api): api update
stainless-app[bot] Apr 26, 2026
37cd5ca
codegen metadata
stainless-app[bot] Apr 26, 2026
5573ee7
feat(api): api update
stainless-app[bot] Apr 26, 2026
c74c369
fix: use correct field name format for multipart file arrays
stainless-app[bot] Apr 28, 2026
0ce56bb
feat: support setting headers via env
stainless-app[bot] Apr 28, 2026
e0601c9
codegen metadata
stainless-app[bot] Apr 30, 2026
fff7c08
codegen metadata
stainless-app[bot] May 1, 2026
3e37dca
chore(internal): reformat pyproject.toml
stainless-app[bot] May 1, 2026
34da1c0
feat(api): api update
stainless-app[bot] May 1, 2026
fcd2959
feat(api): api update
stainless-app[bot] May 6, 2026
00262df
feat(api): api update
stainless-app[bot] May 6, 2026
05c585c
codegen metadata
stainless-app[bot] May 7, 2026
ce906ee
feat(api): api update
stainless-app[bot] May 7, 2026
291415a
feat(api): api update
stainless-app[bot] May 9, 2026
af1c0ca
fix(client): add missing f-string prefix in file type error message
stainless-app[bot] May 9, 2026
44865c2
feat(api): api update
stainless-app[bot] May 10, 2026
29139ab
codegen metadata
stainless-app[bot] May 11, 2026
7f9f4bb
codegen metadata
stainless-app[bot] May 11, 2026
06b88f4
feat(internal/types): support eagerly validating pydantic iterators
stainless-app[bot] May 12, 2026
0d83ee9
ci: pin GitHub Actions to commit SHAs
stainless-app[bot] May 13, 2026
13d1cd8
codegen metadata
stainless-app[bot] May 16, 2026
50382ef
codegen metadata
stainless-app[bot] May 16, 2026
22fbedc
codegen metadata
stainless-app[bot] May 16, 2026
d5636b5
codegen metadata
stainless-app[bot] May 16, 2026
90b98b6
feat(api): api update
stainless-app[bot] May 19, 2026
80f86f0
release: 1.44.0
stainless-app[bot] May 19, 2026
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Rye
run: |
Expand All @@ -46,7 +46,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Rye
run: |
Expand All @@ -67,7 +67,7 @@ jobs:
github.repository == 'stainless-sdks/brand.dev-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -87,7 +87,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'context-dot-dev/deprecated-brand-python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.43.0"
".": "1.44.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-05a30711e18b0023520a660352d75595a050d1299bf0e3ee4a8cf55ded36aea2.yml
openapi_spec_hash: 8d0e1115a7d864f27c55cec3255d1e77
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev/brand.dev-1bc9121ee0f64a15a503b5ec2a7836edfb1e2bf561d22f598ff3cf8f40381a9c.yml
openapi_spec_hash: e4980adb7bd8a6a37a1dbb7f35585b79
config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
# Changelog

## 1.44.0 (2026-05-19)

Full Changelog: [v1.43.0...v1.44.0](https://github.com/context-dot-dev/deprecated-brand-python-sdk/compare/v1.43.0...v1.44.0)

### Features

* **api:** api update ([90b98b6](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/90b98b60f940e7aa127cb2b52fbdf0e467cd45c1))
* **api:** api update ([44865c2](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/44865c2f5a63e7d0e2e4ccd0c4d2c06206044fe8))
* **api:** api update ([291415a](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/291415a60a6ee87cc6b27364e6b71e039ccb3590))
* **api:** api update ([ce906ee](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/ce906ee12160bff29e64d8c140decf63c02fa104))
* **api:** api update ([00262df](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/00262dff8700b717cdacde8d05c040c2e240b94b))
* **api:** api update ([fcd2959](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/fcd2959f013e42957386b17c540c3b69fde4b08e))
* **api:** api update ([34da1c0](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/34da1c09d1e5883a6134fba8bef1a2622a841a3d))
* **api:** api update ([5573ee7](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/5573ee7e42f5018a95e85e66460bfccc3d695a2a))
* **api:** api update ([e4f1307](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/e4f1307a639a0c14467bd4c6af34eafe96b86033))
* **api:** api update ([3e783d9](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/3e783d9ad471999f34ed2cbc92a58099f15ce9cb))
* **api:** api update ([f9047c7](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/f9047c77841d0b1707cdeab18880d93dd2e6a115))
* **api:** api update ([390e85c](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/390e85cad5c6199e1a3d03de72e77d54f0108234))
* **api:** api update ([74f22a5](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/74f22a55a3d82b5adcc63d5f12218a162180ae95))
* **api:** api update ([a04e938](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/a04e9389794725781408dc53d635226406d89cb2))
* **api:** api update ([b4672ab](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/b4672ab67f11664113177977497c75e6c5ce82f8))
* **api:** api update ([b494e66](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/b494e66bdee0f1c447ee587836aa74c7955da0aa))
* **api:** api update ([af4c2fa](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/af4c2fa317c4a5cd2ef86e6562fe41ff7436daed))
* **api:** api update ([9d4a64e](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/9d4a64e28b1321eda8463d8c86ec8a130c78c318))
* **api:** api update ([f13cc2b](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/f13cc2be3ce7c3355168ba62bb3bd5ec5aaf4105))
* **api:** api update ([93a9472](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/93a9472c495a1d34afa82ff7a6889e32ff706e3f))
* **api:** api update ([bf48ceb](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/bf48ceb8693e734ab3da2b89e80f394d351215e6))
* **api:** api update ([b5e8905](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/b5e8905b3e8554890bda8c7eb9e4255c363f1a81))
* **api:** api update ([04fafa1](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/04fafa1b94a4047cc9fb3825ab84e6f517baefc4))
* **api:** api update ([bd0f93f](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/bd0f93f4df85dc1e822ca6b59fb7ce594976ad49))
* **api:** api update ([a388d39](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/a388d39c93b50ec075a553957081a45f64b73d39))
* **api:** api update ([9213463](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/9213463afaf5d76d3b706a5aef49082c72409189))
* **internal/types:** support eagerly validating pydantic iterators ([06b88f4](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/06b88f47143a8e1c9182ceab6bf3c1f2eca6cfdc))
* support setting headers via env ([0ce56bb](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/0ce56bbd77bbb7170a90b838c9dff09616dea488))


### Bug Fixes

* **client:** add missing f-string prefix in file type error message ([af1c0ca](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/af1c0cab6151a11859136bd4cbbd8a0a200acdd5))
* **client:** preserve hardcoded query params when merging with user params ([a92d7b7](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/a92d7b7c66f52b259cbf31d938c8a70565190b5c))
* ensure file data are only sent as 1 parameter ([9b72a51](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/9b72a51afe0d9992f3c52ee727c1ffc1ec76312f))
* use correct field name format for multipart file arrays ([c74c369](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/c74c3699de55fd58f298fa9a9d378db7f677a344))


### Performance Improvements

* **client:** optimize file structure copying in multipart requests ([d7e4a18](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/d7e4a181dd0e9146f98bb51bb977300eac439c6e))


### Chores

* **internal:** more robust bootstrap script ([28007d9](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/28007d91dbe45b20fc33670466006d9934ac7c5a))
* **internal:** reformat pyproject.toml ([3e37dca](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/3e37dcaafaafaa677893794e66cec86afedb65ca))

## 1.43.0 (2026-04-03)

Full Changelog: [v1.42.0...v1.43.0](https://github.com/context-dot-dev/deprecated-brand-python-sdk/compare/v1.42.0...v1.43.0)
Expand Down
8 changes: 0 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ from brand.dev.types import (
BrandAIProductResponse,
BrandAIProductsResponse,
BrandAIQueryResponse,
BrandFontsResponse,
BrandIdentifyFromTransactionResponse,
BrandPrefetchResponse,
BrandPrefetchByEmailResponse,
BrandRetrieveByEmailResponse,
BrandRetrieveByIsinResponse,
BrandRetrieveByNameResponse,
BrandRetrieveByTickerResponse,
BrandRetrieveNaicsResponse,
BrandRetrieveSimplifiedResponse,
BrandScreenshotResponse,
BrandStyleguideResponse,
BrandWebScrapeHTMLResponse,
BrandWebScrapeImagesResponse,
BrandWebScrapeMdResponse,
Expand All @@ -33,18 +29,14 @@ Methods:
- <code title="post /brand/ai/product">client.brand.<a href="./src/brand/dev/resources/brand.py">ai_product</a>(\*\*<a href="src/brand/dev/types/brand_ai_product_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_ai_product_response.py">BrandAIProductResponse</a></code>
- <code title="post /brand/ai/products">client.brand.<a href="./src/brand/dev/resources/brand.py">ai_products</a>(\*\*<a href="src/brand/dev/types/brand_ai_products_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_ai_products_response.py">BrandAIProductsResponse</a></code>
- <code title="post /brand/ai/query">client.brand.<a href="./src/brand/dev/resources/brand.py">ai_query</a>(\*\*<a href="src/brand/dev/types/brand_ai_query_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_ai_query_response.py">BrandAIQueryResponse</a></code>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <code title="get /web/scrape/html">client.brand.<a href="./src/brand/dev/resources/brand.py">web_scrape_html</a>(\*\*<a href="src/brand/dev/types/brand_web_scrape_html_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_web_scrape_html_response.py">BrandWebScrapeHTMLResponse</a></code>
- <code title="get /web/scrape/images">client.brand.<a href="./src/brand/dev/resources/brand.py">web_scrape_images</a>(\*\*<a href="src/brand/dev/types/brand_web_scrape_images_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_web_scrape_images_response.py">BrandWebScrapeImagesResponse</a></code>
- <code title="get /web/scrape/markdown">client.brand.<a href="./src/brand/dev/resources/brand.py">web_scrape_md</a>(\*\*<a href="src/brand/dev/types/brand_web_scrape_md_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_web_scrape_md_response.py">BrandWebScrapeMdResponse</a></code>
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "brand.dev"
version = "1.43.0"
version = "1.44.0"
description = "The official Python library for the brand.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -168,7 +168,7 @@ show_error_codes = true
#
# We also exclude our `tests` as mypy doesn't always infer
# types correctly and Pyright will still catch any type errors.
exclude = ['src/brand/dev/_files.py', '_dev/.*.py', 'tests/.*']
exclude = ["src/brand/dev/_files.py", "_dev/.*.py", "tests/.*"]

strict_equality = true
implicit_reexport = true
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

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

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
Expand Down
4 changes: 4 additions & 0 deletions src/brand/dev/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ def _build_request(
files = cast(HttpxRequestFiles, ForceMultipartDict())

prepared_url = self._prepare_url(options.url)
# preserve hard-coded query params from the url
if params and prepared_url.query:
params = {**dict(prepared_url.params.items()), **params}
prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
if "_" in prepared_url.host:
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
Expand Down
24 changes: 23 additions & 1 deletion src/brand/dev/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
RequestOptions,
not_given,
)
from ._utils import is_given, get_async_library
from ._utils import (
is_given,
is_mapping_t,
get_async_library,
)
from ._compat import cached_property
from ._version import __version__
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
Expand Down Expand Up @@ -90,6 +94,15 @@ def __init__(
if base_url is None:
base_url = f"https://api.brand.dev/v1"

custom_headers_env = os.environ.get("BRAND_DEV_CUSTOM_HEADERS")
if custom_headers_env is not None:
parsed: dict[str, str] = {}
for line in custom_headers_env.split("\n"):
colon = line.find(":")
if colon >= 0:
parsed[line[:colon].strip()] = line[colon + 1 :].strip()
default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})}

super().__init__(
version=__version__,
base_url=base_url,
Expand Down Expand Up @@ -264,6 +277,15 @@ def __init__(
if base_url is None:
base_url = f"https://api.brand.dev/v1"

custom_headers_env = os.environ.get("BRAND_DEV_CUSTOM_HEADERS")
if custom_headers_env is not None:
parsed: dict[str, str] = {}
for line in custom_headers_env.split("\n"):
colon = line.find(":")
if colon >= 0:
parsed[line[:colon].strip()] = line[colon + 1 :].strip()
default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})}

super().__init__(
version=__version__,
base_url=base_url,
Expand Down
Loading