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.14.0"
".": "1.15.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: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-a38595b18a0fe26de444a0dd332f15f1e9e35667fca933d454c303676fac93e2.yml
openapi_spec_hash: 1c4882ef9df6782c91ee94c1f2908a90
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-558cea4d1e47f7f79e5a42b1113401d9488399f96ce57000488ba82eefc74119.yml
openapi_spec_hash: 576db82fb9e7648107687ee308db7eae
config_hash: 4e76a07aea49753a61313dcd8c10fb0f
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.15.0 (2025-09-14)

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

### Features

* **api:** api update ([7f5f368](https://github.com/brand-dot-dev/python-sdk/commit/7f5f368fee87e0b76cb2598bd84fe74be2ca3c98))

## 1.14.0 (2025-09-07)

Full Changelog: [v1.13.0...v1.14.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.13.0...v1.14.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.14.0"
version = "1.15.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.14.0" # x-release-please-version
__version__ = "1.15.0" # x-release-please-version
52 changes: 48 additions & 4 deletions src/brand/dev/resources/brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ def screenshot(
*,
domain: str,
full_screenshot: Literal["true", "false"] | NotGiven = NOT_GIVEN,
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"]
| NotGiven = NOT_GIVEN,
prioritize: Literal["speed", "quality"] | 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,
Expand All @@ -455,8 +458,9 @@ def screenshot(
"""Beta feature: Capture a screenshot of a website.

Supports both viewport
(standard browser view) and full-page screenshots. Returns a URL to the uploaded
screenshot image hosted on our CDN.
(standard browser view) and full-page screenshots. Can also screenshot specific
page types (login, pricing, etc.) by using heuristics to find the appropriate
URL. Returns a URL to the uploaded screenshot image hosted on our CDN.

Args:
domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
Expand All @@ -466,6 +470,15 @@ def screenshot(
screenshot capturing all content. If 'false' or not provided, takes a viewport
screenshot (standard browser view).

page: Optional parameter to specify which page type to screenshot. If provided, the
system will scrape the domain's links and use heuristics to find the most
appropriate URL for the specified page type (30 supported languages). If not
provided, screenshots the main domain landing page.

prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
faster capture with basic quality. If 'quality', optimizes for higher quality
with longer wait times. Defaults to 'quality' if not provided.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -485,6 +498,8 @@ def screenshot(
{
"domain": domain,
"full_screenshot": full_screenshot,
"page": page,
"prioritize": prioritize,
},
brand_screenshot_params.BrandScreenshotParams,
),
Expand All @@ -496,6 +511,7 @@ def styleguide(
self,
*,
domain: str,
prioritize: Literal["speed", "quality"] | 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 @@ -513,6 +529,11 @@ def styleguide(
domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
domain will be automatically normalized and validated.

prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction.
If 'speed', optimizes for faster capture with basic quality. If 'quality',
optimizes for higher quality with longer wait times. Defaults to 'speed' if not
provided.

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).
Expand All @@ -535,6 +556,7 @@ def styleguide(
query=maybe_transform(
{
"domain": domain,
"prioritize": prioritize,
"timeout_ms": timeout_ms,
},
brand_styleguide_params.BrandStyleguideParams,
Expand Down Expand Up @@ -949,6 +971,9 @@ async def screenshot(
*,
domain: str,
full_screenshot: Literal["true", "false"] | NotGiven = NOT_GIVEN,
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"]
| NotGiven = NOT_GIVEN,
prioritize: Literal["speed", "quality"] | 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,
Expand All @@ -959,8 +984,9 @@ async def screenshot(
"""Beta feature: Capture a screenshot of a website.

Supports both viewport
(standard browser view) and full-page screenshots. Returns a URL to the uploaded
screenshot image hosted on our CDN.
(standard browser view) and full-page screenshots. Can also screenshot specific
page types (login, pricing, etc.) by using heuristics to find the appropriate
URL. Returns a URL to the uploaded screenshot image hosted on our CDN.

Args:
domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
Expand All @@ -970,6 +996,15 @@ async def screenshot(
screenshot capturing all content. If 'false' or not provided, takes a viewport
screenshot (standard browser view).

page: Optional parameter to specify which page type to screenshot. If provided, the
system will scrape the domain's links and use heuristics to find the most
appropriate URL for the specified page type (30 supported languages). If not
provided, screenshots the main domain landing page.

prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
faster capture with basic quality. If 'quality', optimizes for higher quality
with longer wait times. Defaults to 'quality' if not provided.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -989,6 +1024,8 @@ async def screenshot(
{
"domain": domain,
"full_screenshot": full_screenshot,
"page": page,
"prioritize": prioritize,
},
brand_screenshot_params.BrandScreenshotParams,
),
Expand All @@ -1000,6 +1037,7 @@ async def styleguide(
self,
*,
domain: str,
prioritize: Literal["speed", "quality"] | 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 @@ -1017,6 +1055,11 @@ async def styleguide(
domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
domain will be automatically normalized and validated.

prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction.
If 'speed', optimizes for faster capture with basic quality. If 'quality',
optimizes for higher quality with longer wait times. Defaults to 'speed' if not
provided.

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).
Expand All @@ -1039,6 +1082,7 @@ async def styleguide(
query=await async_maybe_transform(
{
"domain": domain,
"prioritize": prioritize,
"timeout_ms": timeout_ms,
},
brand_styleguide_params.BrandStyleguideParams,
Expand Down
16 changes: 16 additions & 0 deletions src/brand/dev/types/brand_screenshot_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,19 @@ class BrandScreenshotParams(TypedDict, total=False):
If 'true', takes a full page screenshot capturing all content. If 'false' or not
provided, takes a viewport screenshot (standard browser view).
"""

page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"]
"""Optional parameter to specify which page type to screenshot.

If provided, the system will scrape the domain's links and use heuristics to
find the most appropriate URL for the specified page type (30 supported
languages). If not provided, screenshots the main domain landing page.
"""

prioritize: Literal["speed", "quality"]
"""Optional parameter to prioritize screenshot capture.

If 'speed', optimizes for faster capture with basic quality. If 'quality',
optimizes for higher quality with longer wait times. Defaults to 'quality' if
not provided.
"""
10 changes: 9 additions & 1 deletion src/brand/dev/types/brand_styleguide_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

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

from .._utils import PropertyInfo

Expand All @@ -16,6 +16,14 @@ class BrandStyleguideParams(TypedDict, total=False):
The domain will be automatically normalized and validated.
"""

prioritize: Literal["speed", "quality"]
"""Optional parameter to prioritize screenshot capture for styleguide extraction.

If 'speed', optimizes for faster capture with basic quality. If 'quality',
optimizes for higher quality with longer wait times. Defaults to 'speed' if not
provided.
"""

timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
"""Optional timeout in milliseconds for the request.

Expand Down
6 changes: 6 additions & 0 deletions tests/api_resources/test_brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ def test_method_screenshot_with_all_params(self, client: BrandDev) -> None:
brand = client.brand.screenshot(
domain="domain",
full_screenshot="true",
page="login",
prioritize="speed",
)
assert_matches_type(BrandScreenshotResponse, brand, path=["response"])

Expand Down Expand Up @@ -380,6 +382,7 @@ def test_method_styleguide(self, client: BrandDev) -> None:
def test_method_styleguide_with_all_params(self, client: BrandDev) -> None:
brand = client.brand.styleguide(
domain="domain",
prioritize="speed",
timeout_ms=1,
)
assert_matches_type(BrandStyleguideResponse, brand, path=["response"])
Expand Down Expand Up @@ -728,6 +731,8 @@ async def test_method_screenshot_with_all_params(self, async_client: AsyncBrandD
brand = await async_client.brand.screenshot(
domain="domain",
full_screenshot="true",
page="login",
prioritize="speed",
)
assert_matches_type(BrandScreenshotResponse, brand, path=["response"])

Expand Down Expand Up @@ -770,6 +775,7 @@ async def test_method_styleguide(self, async_client: AsyncBrandDev) -> None:
async def test_method_styleguide_with_all_params(self, async_client: AsyncBrandDev) -> None:
brand = await async_client.brand.styleguide(
domain="domain",
prioritize="speed",
timeout_ms=1,
)
assert_matches_type(BrandStyleguideResponse, brand, path=["response"])
Expand Down