Skip to content

Commit 97e9ae4

Browse files
authored
Merge pull request #2 from brand-dot-dev/release-please--branches--main--changes--next
release: 1.0.0
2 parents 171a0a5 + 1a17708 commit 97e9ae4

12 files changed

Lines changed: 345 additions & 8 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.0.1-alpha.1"
2+
".": "1.0.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: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-bf411a5dc003606804e8544b1ae67679048e1e709ee932d0ee84d005507a3095.yml
3-
openapi_spec_hash: b910fd6625c8b2f3451a03df123cd420
4-
config_hash: 86dcace891937635f9e56dcdea517aa3
1+
configured_endpoints: 6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-d5cf52f21333b8216b73e9659b4a1e8e0675404f0ae3d15bdd7ef368ccfa94cf.yml
3+
openapi_spec_hash: c70cbc2e38e7aeaf2173574a13e9ca55
4+
config_hash: 372b187172495fc2f76f05ba016b4a45

CHANGELOG.md

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

3+
## 1.0.0 (2025-06-02)
4+
5+
Full Changelog: [v0.0.1-alpha.1...v1.0.0](https://github.com/brand-dot-dev/python-sdk/compare/v0.0.1-alpha.1...v1.0.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([90c550f](https://github.com/brand-dot-dev/python-sdk/commit/90c550fdeaefe75facfd24724c878a70f8aa35b4))
10+
311
## 0.0.1-alpha.1 (2025-05-21)
412

513
Full Changelog: [v0.0.1-alpha.0...v0.0.1-alpha.1](https://github.com/brand-dot-dev/python-sdk/compare/v0.0.1-alpha.0...v0.0.1-alpha.1)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The full API of this library can be found in [api.md](api.md).
1616

1717
```sh
1818
# install from PyPI
19-
pip install --pre brand.dev
19+
pip install brand.dev
2020
```
2121

2222
## Usage

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Types:
55
```python
66
from brand.dev.types import (
77
BrandRetrieveResponse,
8+
BrandAIQueryResponse,
89
BrandIdentifyFromTransactionResponse,
910
BrandRetrieveByTickerResponse,
1011
BrandRetrieveNaicsResponse,
@@ -15,6 +16,7 @@ from brand.dev.types import (
1516
Methods:
1617

1718
- <code title="get /brand/retrieve">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_response.py">BrandRetrieveResponse</a></code>
19+
- <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>
1820
- <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>
1921
- <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>
2022
- <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>

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 = "0.0.1-alpha.1"
3+
version = "1.0.0"
44
description = "The official Python library for the brand.dev API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

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__ = "0.0.1-alpha.1" # x-release-please-version
4+
__version__ = "1.0.0" # x-release-please-version

src/brand/dev/resources/brand.py

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
from __future__ import annotations
44

5+
from typing import List, Iterable
56
from typing_extensions import Literal
67

78
import httpx
89

910
from ..types import (
1011
brand_search_params,
12+
brand_ai_query_params,
1113
brand_retrieve_params,
1214
brand_retrieve_naics_params,
1315
brand_retrieve_by_ticker_params,
@@ -25,6 +27,7 @@
2527
)
2628
from .._base_client import make_request_options
2729
from ..types.brand_search_response import BrandSearchResponse
30+
from ..types.brand_ai_query_response import BrandAIQueryResponse
2831
from ..types.brand_retrieve_response import BrandRetrieveResponse
2932
from ..types.brand_retrieve_naics_response import BrandRetrieveNaicsResponse
3033
from ..types.brand_retrieve_by_ticker_response import BrandRetrieveByTickerResponse
@@ -153,6 +156,56 @@ def retrieve(
153156
cast_to=BrandRetrieveResponse,
154157
)
155158

159+
def ai_query(
160+
self,
161+
*,
162+
data_to_extract: Iterable[brand_ai_query_params.DataToExtract],
163+
domain: str,
164+
specific_pages: List[str] | NotGiven = NOT_GIVEN,
165+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
166+
# The extra values given here take precedence over values defined on the client or passed to this method.
167+
extra_headers: Headers | None = None,
168+
extra_query: Query | None = None,
169+
extra_body: Body | None = None,
170+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
171+
) -> BrandAIQueryResponse:
172+
"""Beta feature: Use AI to extract specific data points from a brand's website.
173+
174+
The
175+
AI will crawl the website and extract the requested information based on the
176+
provided data points.
177+
178+
Args:
179+
data_to_extract: Array of data points to extract from the website
180+
181+
domain: The domain name to analyze
182+
183+
specific_pages: Optional array of specific pages to analyze
184+
185+
extra_headers: Send extra headers
186+
187+
extra_query: Add additional query parameters to the request
188+
189+
extra_body: Add additional JSON properties to the request
190+
191+
timeout: Override the client-level default timeout for this request, in seconds
192+
"""
193+
return self._post(
194+
"/brand/ai/query",
195+
body=maybe_transform(
196+
{
197+
"data_to_extract": data_to_extract,
198+
"domain": domain,
199+
"specific_pages": specific_pages,
200+
},
201+
brand_ai_query_params.BrandAIQueryParams,
202+
),
203+
options=make_request_options(
204+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
205+
),
206+
cast_to=BrandAIQueryResponse,
207+
)
208+
156209
def identify_from_transaction(
157210
self,
158211
*,
@@ -429,6 +482,56 @@ async def retrieve(
429482
cast_to=BrandRetrieveResponse,
430483
)
431484

485+
async def ai_query(
486+
self,
487+
*,
488+
data_to_extract: Iterable[brand_ai_query_params.DataToExtract],
489+
domain: str,
490+
specific_pages: List[str] | NotGiven = NOT_GIVEN,
491+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
492+
# The extra values given here take precedence over values defined on the client or passed to this method.
493+
extra_headers: Headers | None = None,
494+
extra_query: Query | None = None,
495+
extra_body: Body | None = None,
496+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
497+
) -> BrandAIQueryResponse:
498+
"""Beta feature: Use AI to extract specific data points from a brand's website.
499+
500+
The
501+
AI will crawl the website and extract the requested information based on the
502+
provided data points.
503+
504+
Args:
505+
data_to_extract: Array of data points to extract from the website
506+
507+
domain: The domain name to analyze
508+
509+
specific_pages: Optional array of specific pages to analyze
510+
511+
extra_headers: Send extra headers
512+
513+
extra_query: Add additional query parameters to the request
514+
515+
extra_body: Add additional JSON properties to the request
516+
517+
timeout: Override the client-level default timeout for this request, in seconds
518+
"""
519+
return await self._post(
520+
"/brand/ai/query",
521+
body=await async_maybe_transform(
522+
{
523+
"data_to_extract": data_to_extract,
524+
"domain": domain,
525+
"specific_pages": specific_pages,
526+
},
527+
brand_ai_query_params.BrandAIQueryParams,
528+
),
529+
options=make_request_options(
530+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
531+
),
532+
cast_to=BrandAIQueryResponse,
533+
)
534+
432535
async def identify_from_transaction(
433536
self,
434537
*,
@@ -596,6 +699,9 @@ def __init__(self, brand: BrandResource) -> None:
596699
self.retrieve = to_raw_response_wrapper(
597700
brand.retrieve,
598701
)
702+
self.ai_query = to_raw_response_wrapper(
703+
brand.ai_query,
704+
)
599705
self.identify_from_transaction = to_raw_response_wrapper(
600706
brand.identify_from_transaction,
601707
)
@@ -617,6 +723,9 @@ def __init__(self, brand: AsyncBrandResource) -> None:
617723
self.retrieve = async_to_raw_response_wrapper(
618724
brand.retrieve,
619725
)
726+
self.ai_query = async_to_raw_response_wrapper(
727+
brand.ai_query,
728+
)
620729
self.identify_from_transaction = async_to_raw_response_wrapper(
621730
brand.identify_from_transaction,
622731
)
@@ -638,6 +747,9 @@ def __init__(self, brand: BrandResource) -> None:
638747
self.retrieve = to_streamed_response_wrapper(
639748
brand.retrieve,
640749
)
750+
self.ai_query = to_streamed_response_wrapper(
751+
brand.ai_query,
752+
)
641753
self.identify_from_transaction = to_streamed_response_wrapper(
642754
brand.identify_from_transaction,
643755
)
@@ -659,6 +771,9 @@ def __init__(self, brand: AsyncBrandResource) -> None:
659771
self.retrieve = async_to_streamed_response_wrapper(
660772
brand.retrieve,
661773
)
774+
self.ai_query = async_to_streamed_response_wrapper(
775+
brand.ai_query,
776+
)
662777
self.identify_from_transaction = async_to_streamed_response_wrapper(
663778
brand.identify_from_transaction,
664779
)

src/brand/dev/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
from __future__ import annotations
44

55
from .brand_search_params import BrandSearchParams as BrandSearchParams
6+
from .brand_ai_query_params import BrandAIQueryParams as BrandAIQueryParams
67
from .brand_retrieve_params import BrandRetrieveParams as BrandRetrieveParams
78
from .brand_search_response import BrandSearchResponse as BrandSearchResponse
9+
from .brand_ai_query_response import BrandAIQueryResponse as BrandAIQueryResponse
810
from .brand_retrieve_response import BrandRetrieveResponse as BrandRetrieveResponse
911
from .brand_retrieve_naics_params import BrandRetrieveNaicsParams as BrandRetrieveNaicsParams
1012
from .brand_retrieve_naics_response import BrandRetrieveNaicsResponse as BrandRetrieveNaicsResponse
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import List, Iterable
6+
from typing_extensions import Literal, Required, TypedDict
7+
8+
__all__ = ["BrandAIQueryParams", "DataToExtract"]
9+
10+
11+
class BrandAIQueryParams(TypedDict, total=False):
12+
data_to_extract: Required[Iterable[DataToExtract]]
13+
"""Array of data points to extract from the website"""
14+
15+
domain: Required[str]
16+
"""The domain name to analyze"""
17+
18+
specific_pages: List[str]
19+
"""Optional array of specific pages to analyze"""
20+
21+
22+
class DataToExtract(TypedDict, total=False):
23+
datapoint_description: Required[str]
24+
"""Description of what to extract"""
25+
26+
datapoint_example: Required[str]
27+
"""Example of the expected value"""
28+
29+
datapoint_name: Required[str]
30+
"""Name of the data point to extract"""
31+
32+
datapoint_type: Required[Literal["text", "number", "date", "boolean", "list", "url"]]
33+
"""Type of the data point"""

0 commit comments

Comments
 (0)