Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.11.0"
".": "1.12.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 9
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-a41dc66f0aa3dbc9e8fe1da75f1101cbcb2fac79f728de42e4877cfe1bde3b6e.yml
openapi_spec_hash: 63c1a53e0899fb63a514dad395fd48f9
config_hash: 4b10254ea5b8e26ce632222b94a918aa
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-0758a435064bd016fe211989cb7f6a3441460664aead5870777f8a662aa69794.yml
openapi_spec_hash: d646572eb126d1d18327240959fc96af
config_hash: a7a306a1c85eef178e7989e0ce5979c6
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 1.12.0 (2025-08-19)

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

### Features

* **api:** api update ([f91ea74](https://github.com/brand-dot-dev/python-sdk/commit/f91ea744a88f266bc754d3225fbeb90e01d8c759))
* **api:** api update ([ed3e4c7](https://github.com/brand-dot-dev/python-sdk/commit/ed3e4c7f6f4d0e23f1879959ac1cc534454ff8d8))
* **api:** api update ([eb66567](https://github.com/brand-dot-dev/python-sdk/commit/eb66567eee137fe637b6629a0113b3af26eae9e9))


### Chores

* **internal:** codegen related update ([2b591ec](https://github.com/brand-dot-dev/python-sdk/commit/2b591ec1951445ed47e3c7d5e2f129e04133b42e))
* **internal:** fix ruff target version ([8674d17](https://github.com/brand-dot-dev/python-sdk/commit/8674d1739383a872081dbc40b3726572654a5800))
* **internal:** update comment in script ([59767cf](https://github.com/brand-dot-dev/python-sdk/commit/59767cfff3a11d740c30d764b566730551b1e259))
* update @stainless-api/prism-cli to v5.15.0 ([c3e909c](https://github.com/brand-dot-dev/python-sdk/commit/c3e909c65e6d21d669321ac53dbb7ac84a5d9afc))

## 1.11.0 (2025-07-31)

Full Changelog: [v1.10.1...v1.11.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.10.1...v1.11.0)
Expand Down
2 changes: 0 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ from brand.dev.types import (
BrandAIQueryResponse,
BrandIdentifyFromTransactionResponse,
BrandPrefetchResponse,
BrandRetrieveByTickerResponse,
BrandRetrieveNaicsResponse,
BrandRetrieveSimplifiedResponse,
BrandScreenshotResponse,
Expand All @@ -22,7 +21,6 @@ Methods:
- <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/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="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>
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.11.0"
version = "1.12.0"
description = "The official Python library for the brand.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -159,7 +159,7 @@ reportPrivateUsage = false
[tool.ruff]
line-length = 120
output-format = "grouped"
target-version = "py37"
target-version = "py38"

[tool.ruff.format]
docstring-code-format = true
Expand Down
4 changes: 2 additions & 2 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log &
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
echo -n "Waiting for server"
Expand All @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL"
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
fi
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elif ! prism_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}"
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
Expand Down
2 changes: 1 addition & 1 deletion src/brand/dev/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "brand.dev"
__version__ = "1.11.0" # x-release-please-version
__version__ = "1.12.0" # x-release-please-version
162 changes: 40 additions & 122 deletions src/brand/dev/resources/brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
brand_screenshot_params,
brand_styleguide_params,
brand_retrieve_naics_params,
brand_retrieve_by_ticker_params,
brand_retrieve_simplified_params,
brand_identify_from_transaction_params,
)
Expand All @@ -35,7 +34,6 @@
from ..types.brand_screenshot_response import BrandScreenshotResponse
from ..types.brand_styleguide_response import BrandStyleguideResponse
from ..types.brand_retrieve_naics_response import BrandRetrieveNaicsResponse
from ..types.brand_retrieve_by_ticker_response import BrandRetrieveByTickerResponse
from ..types.brand_retrieve_simplified_response import BrandRetrieveSimplifiedResponse
from ..types.brand_identify_from_transaction_response import BrandIdentifyFromTransactionResponse

Expand Down Expand Up @@ -65,7 +63,7 @@ def with_streaming_response(self) -> BrandResourceWithStreamingResponse:
def retrieve(
self,
*,
domain: str,
domain: str | NotGiven = NOT_GIVEN,
force_language: Literal[
"albanian",
"arabic",
Expand Down Expand Up @@ -122,6 +120,8 @@ def retrieve(
]
| NotGiven = NOT_GIVEN,
max_speed: bool | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
ticker: str | NotGiven = NOT_GIVEN,
timeout_ms: int | 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.
Expand All @@ -131,16 +131,27 @@ def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BrandRetrieveResponse:
"""
Retrieve brand data by domain
Retrieve brand information using one of three methods: domain name, company
name, or stock ticker symbol. Exactly one of these parameters must be provided.

Args:
domain: Domain name to retrieve brand data for
domain: Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
Cannot be used with name or ticker parameters.

force_language: Optional parameter to force the language of the retrieved brand data
force_language: Optional parameter to force the language of the retrieved brand data. Works with
all three lookup methods.

max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
the API will skip time-consuming operations for faster response at the cost of
less comprehensive data.
less comprehensive data. Works with all three lookup methods.

name: Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft
Corporation'). Must be 3-30 characters. Cannot be used with domain or ticker
parameters.

ticker: Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
Must be 1-6 characters, letters/numbers/dots only. Cannot be used with domain or
name parameters.

timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
than this value, it will be aborted with a 408 status code. Maximum allowed
Expand All @@ -166,6 +177,8 @@ def retrieve(
"domain": domain,
"force_language": force_language,
"max_speed": max_speed,
"name": name,
"ticker": ticker,
"timeout_ms": timeout_ms,
},
brand_retrieve_params.BrandRetrieveParams,
Expand Down Expand Up @@ -327,55 +340,6 @@ def prefetch(
cast_to=BrandPrefetchResponse,
)

def retrieve_by_ticker(
self,
*,
ticker: str,
timeout_ms: int | 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,
) -> BrandRetrieveByTickerResponse:
"""Retrieve brand data by stock ticker (e.g.

AAPL, TSLA, etc.)

Args:
ticker: Stock ticker symbol to retrieve brand data for (e.g. AAPL, TSLA, etc.)

timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).

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._get(
"/brand/retrieve-by-ticker",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"ticker": ticker,
"timeout_ms": timeout_ms,
},
brand_retrieve_by_ticker_params.BrandRetrieveByTickerParams,
),
),
cast_to=BrandRetrieveByTickerResponse,
)

def retrieve_naics(
self,
*,
Expand Down Expand Up @@ -603,7 +567,7 @@ def with_streaming_response(self) -> AsyncBrandResourceWithStreamingResponse:
async def retrieve(
self,
*,
domain: str,
domain: str | NotGiven = NOT_GIVEN,
force_language: Literal[
"albanian",
"arabic",
Expand Down Expand Up @@ -660,6 +624,8 @@ async def retrieve(
]
| NotGiven = NOT_GIVEN,
max_speed: bool | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
ticker: str | NotGiven = NOT_GIVEN,
timeout_ms: int | 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.
Expand All @@ -669,16 +635,27 @@ async def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BrandRetrieveResponse:
"""
Retrieve brand data by domain
Retrieve brand information using one of three methods: domain name, company
name, or stock ticker symbol. Exactly one of these parameters must be provided.

Args:
domain: Domain name to retrieve brand data for
domain: Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
Cannot be used with name or ticker parameters.

force_language: Optional parameter to force the language of the retrieved brand data
force_language: Optional parameter to force the language of the retrieved brand data. Works with
all three lookup methods.

max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
the API will skip time-consuming operations for faster response at the cost of
less comprehensive data.
less comprehensive data. Works with all three lookup methods.

name: Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft
Corporation'). Must be 3-30 characters. Cannot be used with domain or ticker
parameters.

ticker: Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
Must be 1-6 characters, letters/numbers/dots only. Cannot be used with domain or
name parameters.

timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
than this value, it will be aborted with a 408 status code. Maximum allowed
Expand All @@ -704,6 +681,8 @@ async def retrieve(
"domain": domain,
"force_language": force_language,
"max_speed": max_speed,
"name": name,
"ticker": ticker,
"timeout_ms": timeout_ms,
},
brand_retrieve_params.BrandRetrieveParams,
Expand Down Expand Up @@ -865,55 +844,6 @@ async def prefetch(
cast_to=BrandPrefetchResponse,
)

async def retrieve_by_ticker(
self,
*,
ticker: str,
timeout_ms: int | 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,
) -> BrandRetrieveByTickerResponse:
"""Retrieve brand data by stock ticker (e.g.

AAPL, TSLA, etc.)

Args:
ticker: Stock ticker symbol to retrieve brand data for (e.g. AAPL, TSLA, etc.)

timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).

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._get(
"/brand/retrieve-by-ticker",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{
"ticker": ticker,
"timeout_ms": timeout_ms,
},
brand_retrieve_by_ticker_params.BrandRetrieveByTickerParams,
),
),
cast_to=BrandRetrieveByTickerResponse,
)

async def retrieve_naics(
self,
*,
Expand Down Expand Up @@ -1134,9 +1064,6 @@ def __init__(self, brand: BrandResource) -> None:
self.prefetch = to_raw_response_wrapper(
brand.prefetch,
)
self.retrieve_by_ticker = to_raw_response_wrapper(
brand.retrieve_by_ticker,
)
self.retrieve_naics = to_raw_response_wrapper(
brand.retrieve_naics,
)
Expand Down Expand Up @@ -1167,9 +1094,6 @@ def __init__(self, brand: AsyncBrandResource) -> None:
self.prefetch = async_to_raw_response_wrapper(
brand.prefetch,
)
self.retrieve_by_ticker = async_to_raw_response_wrapper(
brand.retrieve_by_ticker,
)
self.retrieve_naics = async_to_raw_response_wrapper(
brand.retrieve_naics,
)
Expand Down Expand Up @@ -1200,9 +1124,6 @@ def __init__(self, brand: BrandResource) -> None:
self.prefetch = to_streamed_response_wrapper(
brand.prefetch,
)
self.retrieve_by_ticker = to_streamed_response_wrapper(
brand.retrieve_by_ticker,
)
self.retrieve_naics = to_streamed_response_wrapper(
brand.retrieve_naics,
)
Expand Down Expand Up @@ -1233,9 +1154,6 @@ def __init__(self, brand: AsyncBrandResource) -> None:
self.prefetch = async_to_streamed_response_wrapper(
brand.prefetch,
)
self.retrieve_by_ticker = async_to_streamed_response_wrapper(
brand.retrieve_by_ticker,
)
self.retrieve_naics = async_to_streamed_response_wrapper(
brand.retrieve_naics,
)
Expand Down
2 changes: 0 additions & 2 deletions src/brand/dev/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
from .brand_styleguide_response import BrandStyleguideResponse as BrandStyleguideResponse
from .brand_retrieve_naics_params import BrandRetrieveNaicsParams as BrandRetrieveNaicsParams
from .brand_retrieve_naics_response import BrandRetrieveNaicsResponse as BrandRetrieveNaicsResponse
from .brand_retrieve_by_ticker_params import BrandRetrieveByTickerParams as BrandRetrieveByTickerParams
from .brand_retrieve_simplified_params import BrandRetrieveSimplifiedParams as BrandRetrieveSimplifiedParams
from .brand_retrieve_by_ticker_response import BrandRetrieveByTickerResponse as BrandRetrieveByTickerResponse
from .brand_retrieve_simplified_response import BrandRetrieveSimplifiedResponse as BrandRetrieveSimplifiedResponse
from .brand_identify_from_transaction_params import (
BrandIdentifyFromTransactionParams as BrandIdentifyFromTransactionParams,
Expand Down
Loading