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.34.0"
".": "1.35.0"
}
4 changes: 2 additions & 2 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-2cdd67823c6ac9d1ab68032a695c31a098ad285ffb0c073b9dfc00afe5de9b88.yml
openapi_spec_hash: ac8a965beb9b667b6204a5c573507219
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-3614380ba4315687bbaf6561e9872fd72dd876f9230ce690c35d7efc1250e808.yml
openapi_spec_hash: f1aa17e08d0379766a61de68714c7c21
config_hash: 4cd3173ea1cce7183640aae49cfbb374
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.35.0 (2026-02-24)

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

### Features

* **api:** api update ([42f1031](https://github.com/brand-dot-dev/python-sdk/commit/42f10313977a9f557c5b067f81f8bbad55fdd76a))

## 1.34.0 (2026-02-23)

Full Changelog: [v1.33.0...v1.34.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.33.0...v1.34.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "brand.dev"
version = "1.34.0"
version = "1.35.0"
description = "The official Python library for the brand.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
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.34.0" # x-release-please-version
__version__ = "1.35.0" # x-release-please-version
18 changes: 16 additions & 2 deletions src/brand/dev/resources/brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,8 @@ def screenshot(
def styleguide(
self,
*,
domain: str,
direct_url: str | Omit = omit,
domain: str | Omit = omit,
prioritize: Literal["speed", "quality"] | Omit = omit,
timeout_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -1664,8 +1665,13 @@ def styleguide(
"""
Automatically extract comprehensive design system information from a brand's
website including colors, typography, spacing, shadows, and UI components.
Either 'domain' or 'directUrl' must be provided as a query parameter, but not
both.

Args:
direct_url: A specific URL to fetch the styleguide from directly, bypassing domain
resolution (e.g., 'https://example.com/design-system').

domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
domain will be automatically normalized and validated.

Expand Down Expand Up @@ -1695,6 +1701,7 @@ def styleguide(
timeout=timeout,
query=maybe_transform(
{
"direct_url": direct_url,
"domain": domain,
"prioritize": prioritize,
"timeout_ms": timeout_ms,
Expand Down Expand Up @@ -3465,7 +3472,8 @@ async def screenshot(
async def styleguide(
self,
*,
domain: str,
direct_url: str | Omit = omit,
domain: str | Omit = omit,
prioritize: Literal["speed", "quality"] | Omit = omit,
timeout_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -3478,8 +3486,13 @@ async def styleguide(
"""
Automatically extract comprehensive design system information from a brand's
website including colors, typography, spacing, shadows, and UI components.
Either 'domain' or 'directUrl' must be provided as a query parameter, but not
both.

Args:
direct_url: A specific URL to fetch the styleguide from directly, bypassing domain
resolution (e.g., 'https://example.com/design-system').

domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
domain will be automatically normalized and validated.

Expand Down Expand Up @@ -3509,6 +3522,7 @@ async def styleguide(
timeout=timeout,
query=await async_maybe_transform(
{
"direct_url": direct_url,
"domain": domain,
"prioritize": prioritize,
"timeout_ms": timeout_ms,
Expand Down
10 changes: 8 additions & 2 deletions src/brand/dev/types/brand_styleguide_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@

from __future__ import annotations

from typing_extensions import Literal, Required, Annotated, TypedDict
from typing_extensions import Literal, Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["BrandStyleguideParams"]


class BrandStyleguideParams(TypedDict, total=False):
domain: Required[str]
direct_url: Annotated[str, PropertyInfo(alias="directUrl")]
"""
A specific URL to fetch the styleguide from directly, bypassing domain
resolution (e.g., 'https://example.com/design-system').
"""

domain: str
"""Domain name to extract styleguide from (e.g., 'example.com', 'google.com').

The domain will be automatically normalized and validated.
Expand Down
26 changes: 8 additions & 18 deletions tests/api_resources/test_brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,15 +800,14 @@ def test_streaming_response_screenshot(self, client: BrandDev) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_styleguide(self, client: BrandDev) -> None:
brand = client.brand.styleguide(
domain="domain",
)
brand = client.brand.styleguide()
assert_matches_type(BrandStyleguideResponse, brand, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_styleguide_with_all_params(self, client: BrandDev) -> None:
brand = client.brand.styleguide(
direct_url="https://example.com",
domain="domain",
prioritize="speed",
timeout_ms=1000,
Expand All @@ -818,9 +817,7 @@ def test_method_styleguide_with_all_params(self, client: BrandDev) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_styleguide(self, client: BrandDev) -> None:
response = client.brand.with_raw_response.styleguide(
domain="domain",
)
response = client.brand.with_raw_response.styleguide()

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -830,9 +827,7 @@ def test_raw_response_styleguide(self, client: BrandDev) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_styleguide(self, client: BrandDev) -> None:
with client.brand.with_streaming_response.styleguide(
domain="domain",
) as response:
with client.brand.with_streaming_response.styleguide() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

Expand Down Expand Up @@ -1755,15 +1750,14 @@ async def test_streaming_response_screenshot(self, async_client: AsyncBrandDev)
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_styleguide(self, async_client: AsyncBrandDev) -> None:
brand = await async_client.brand.styleguide(
domain="domain",
)
brand = await async_client.brand.styleguide()
assert_matches_type(BrandStyleguideResponse, brand, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_styleguide_with_all_params(self, async_client: AsyncBrandDev) -> None:
brand = await async_client.brand.styleguide(
direct_url="https://example.com",
domain="domain",
prioritize="speed",
timeout_ms=1000,
Expand All @@ -1773,9 +1767,7 @@ async def test_method_styleguide_with_all_params(self, async_client: AsyncBrandD
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_styleguide(self, async_client: AsyncBrandDev) -> None:
response = await async_client.brand.with_raw_response.styleguide(
domain="domain",
)
response = await async_client.brand.with_raw_response.styleguide()

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -1785,9 +1777,7 @@ async def test_raw_response_styleguide(self, async_client: AsyncBrandDev) -> Non
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_styleguide(self, async_client: AsyncBrandDev) -> None:
async with async_client.brand.with_streaming_response.styleguide(
domain="domain",
) as response:
async with async_client.brand.with_streaming_response.styleguide() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

Expand Down