Skip to content

Commit 27aa17a

Browse files
authored
Merge pull request #3 from brand-dot-dev/release-please--branches--main--changes--next
release: 1.1.0
2 parents 97e9ae4 + 4261674 commit 27aa17a

15 files changed

Lines changed: 166 additions & 19 deletions

.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.0.0"
2+
".": "1.1.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
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
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-c921d60adf854da13dbb83d547cbd8a32fd86d625fb12a325b7d305da7f3a93a.yml
3+
openapi_spec_hash: c02b88f26faaf9fd04177b77d34fd5c3
44
config_hash: 372b187172495fc2f76f05ba016b4a45

CHANGELOG.md

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

3+
## 1.1.0 (2025-06-03)
4+
5+
Full Changelog: [v1.0.0...v1.1.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.0.0...v1.1.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([fa44a02](https://github.com/brand-dot-dev/python-sdk/commit/fa44a02f3397ae35b14ce65f8cacb60b4cc76b33))
10+
* **client:** add follow_redirects request option ([7a9a565](https://github.com/brand-dot-dev/python-sdk/commit/7a9a5654ef7f84e4b8231ec5c50b972dc2241dba))
11+
12+
13+
### Chores
14+
15+
* **docs:** remove reference to rye shell ([5d1533b](https://github.com/brand-dot-dev/python-sdk/commit/5d1533ba7fd39e6d1b0cc4cd44793e4de4233d64))
16+
* **docs:** remove unnecessary param examples ([93f2f3f](https://github.com/brand-dot-dev/python-sdk/commit/93f2f3f95c7ebaa648a16c752d4d81c48929c39c))
17+
* **internal:** version bump ([7a15a0a](https://github.com/brand-dot-dev/python-sdk/commit/7a15a0aceaca0cd700f7aab8282e5bdef8cbf31f))
18+
319
## 1.0.0 (2025-06-02)
420

521
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)

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ $ rye sync --all-features
1717
You can then run scripts using `rye run python script.py` or by activating the virtual environment:
1818

1919
```sh
20-
$ rye shell
21-
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
20+
# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
2221
$ source .venv/bin/activate
2322

2423
# now you can omit the `rye run` prefix

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,30 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
7777

7878
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
7979

80+
## Nested params
81+
82+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
83+
84+
```python
85+
from brand.dev import BrandDev
86+
87+
client = BrandDev()
88+
89+
response = client.brand.ai_query(
90+
data_to_extract=[
91+
{
92+
"datapoint_description": "datapoint_description",
93+
"datapoint_example": "datapoint_example",
94+
"datapoint_name": "datapoint_name",
95+
"datapoint_type": "text",
96+
}
97+
],
98+
domain="domain",
99+
specific_pages={},
100+
)
101+
print(response.specific_pages)
102+
```
103+
80104
## Handling errors
81105

82106
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `brand.dev.APIConnectionError` is raised.

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

scripts/utils/upload-artifact.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
1818

1919
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
2020
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
21-
echo -e "\033[32mInstallation: pip install --pre 'https://pkg.stainless.com/s/brand.dev-python/$SHA'\033[0m"
21+
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/brand.dev-python/$SHA'\033[0m"
2222
else
2323
echo -e "\033[31mFailed to upload artifact.\033[0m"
2424
exit 1

src/brand/dev/_base_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,9 @@ def request(
960960
if self.custom_auth is not None:
961961
kwargs["auth"] = self.custom_auth
962962

963+
if options.follow_redirects is not None:
964+
kwargs["follow_redirects"] = options.follow_redirects
965+
963966
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
964967

965968
response = None
@@ -1460,6 +1463,9 @@ async def request(
14601463
if self.custom_auth is not None:
14611464
kwargs["auth"] = self.custom_auth
14621465

1466+
if options.follow_redirects is not None:
1467+
kwargs["follow_redirects"] = options.follow_redirects
1468+
14631469
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
14641470

14651471
response = None

src/brand/dev/_models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
737737
idempotency_key: str
738738
json_data: Body
739739
extra_json: AnyMapping
740+
follow_redirects: bool
740741

741742

742743
@final
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
750751
files: Union[HttpxRequestFiles, None] = None
751752
idempotency_key: Union[str, None] = None
752753
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
754+
follow_redirects: Union[bool, None] = None
753755

754756
# It should be noted that we cannot use `json` here as that would override
755757
# a BaseModel method in an incompatible fashion.

src/brand/dev/_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
100100
params: Query
101101
extra_json: AnyMapping
102102
idempotency_key: str
103+
follow_redirects: bool
103104

104105

105106
# Sentinel class used until PEP 0661 is accepted
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
215216

216217
class HttpxSendArgs(TypedDict, total=False):
217218
auth: httpx.Auth
219+
follow_redirects: bool

0 commit comments

Comments
 (0)