brightsites_sdk

Interface to Brightsites API.

Submodules

Classes

BrightsitesServices

A class wrapping Brightsites interaction.

OrdersList

A list of orders.

OrderSummary

Short view of an order.

PaginatedResponse

A paginated response.

PaginationMeta

Pagination metadata.

Product

A product.

ProductCategory

Product category.

ProductOption

A option for a product.

ProductOptionsList

A list of options for a product.

ProductsList

A list of products.

ProductSubOption

Sub options for a product.

ProductSubOptionsList

A list of sub options.

ProductSummary

Short view of a product.

ProductVendor

Product vendor.

Package Contents

class brightsites_sdk.BrightsitesServices(base_url: str, token: str, timeout: float = 10.0)[source]

A class wrapping Brightsites interaction.

client[source]
_make_request(method: str, path: str, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None) httpx.Response[source]

Make a request to Brightsites.

list_orders() brightsites_sdk.models.OrdersList[source]

List orders.

list_products(page: int = 1) brightsites_sdk.models.ProductsList[source]

List products.

get_product(product_id: int) brightsites_sdk.models.Product[source]

Get a product by ID.

list_product_options(product_id: int) brightsites_sdk.models.ProductOptionsList[source]

Get product options.

list_product_sub_options(product_id: int, option_id: int) brightsites_sdk.models.ProductSubOptionsList[source]

Get product sub-options.

class brightsites_sdk.OrdersList(/, **data: Any)[source]

Bases: PaginatedResponse

A list of orders.

orders: list[OrderSummary][source]
class brightsites_sdk.OrderSummary(/, **data: Any)[source]

Bases: _BaseModel

Short view of an order.

created_at: datetime.datetime = None[source]
updated_at: datetime.datetime = None[source]
order_id: int[source]
shipping_method: str[source]
tracking: str[source]
status: str[source]
customer: pydantic.EmailStr[source]
class brightsites_sdk.PaginatedResponse(/, **data: Any)[source]

Bases: _BaseModel

A paginated response.

meta: PaginationMeta[source]
class brightsites_sdk.PaginationMeta(/, **data: Any)[source]

Bases: _BaseModel

Pagination metadata.

total: int[source]
offset: int[source]
limit: int[source]
class brightsites_sdk.Product(/, **data: Any)[source]

Bases: _BaseModel

A product.

id: int[source]
name: str[source]
sku: str[source]
sku_separator: str[source]
internal_id: str | None[source]
origin_address_id: int | None[source]
new_product: bool[source]
new_expires_at: datetime.datetime | None = None[source]
base_price: str[source]
retail_price: str | None[source]
cost: str | None[source]
setup_charge: str | None[source]
minimum_order_quantity: int | None[source]
maximum_order_quantity: int | None[source]
weight: str | None[source]
width: str | None[source]
height: str | None[source]
length: str | None[source]
shipping_modifier: str | None[source]
meta_title: str | None[source]
meta_description: str | None[source]
meta_keywords: str | None[source]
custom_url: str | None[source]
description: str | None[source]
active: bool[source]
featured: bool[source]
tax_exempt: bool[source]
shipping_exempt: bool[source]
categories: list[ProductCategory][source]
vendors: list[ProductVendor][source]
options: list[ProductOption][source]
sub_options: list[ProductSubOption][source]
inventories: list[ProductInventory][source]
enable_quantity_discount: bool[source]
related_products_type: str[source]
enable_product_personalization: bool[source]
enable_inventory: bool[source]
enable_logo_locations: bool[source]
enable_product_options: bool[source]
primary_category_id: int | None[source]
vendor_inventory_enabled: bool[source]
inventory_vendor_id: int | None[source]
tax_code: str | None[source]
note: str | None[source]
created_at: datetime.datetime | None = None[source]
updated_at: datetime.datetime | None = None[source]
class brightsites_sdk.ProductCategory(/, **data: Any)[source]

Bases: _BaseModel

Product category.

id: int[source]
name: str[source]
class brightsites_sdk.ProductOption(/, **data: Any)[source]

Bases: _BaseModel

A option for a product.

id: int[source]
name: str[source]
friendly_name: str[source]
option_type: str[source]
price_modifier_type: str[source]
show_in_inventory: bool[source]
show_as_thumbs: bool[source]
include_in_images: bool[source]
required: bool[source]
multiple_quantity: bool[source]
position: int[source]
class brightsites_sdk.ProductOptionsList(/, **data: Any)[source]

Bases: _BaseModel

A list of options for a product.

enabled: bool[source]
options: list[ProductOption][source]
class brightsites_sdk.ProductsList(/, **data: Any)[source]

Bases: PaginatedResponse

A list of products.

products: list[ProductSummary][source]
class brightsites_sdk.ProductSubOption(/, **data: Any)[source]

Bases: _BaseModel

Sub options for a product.

id: int[source]
name: str[source]
sub_sku: str | None[source]
image_src: str | None[source]
price_modifier: str[source]
position: int[source]
product_option_id: int[source]
class brightsites_sdk.ProductSubOptionsList(/, **data: Any)[source]

Bases: _BaseModel

A list of sub options.

sub_options: list[ProductSubOption][source]
class brightsites_sdk.ProductSummary(/, **data: Any)[source]

Bases: _BaseModel

Short view of a product.

created_at: datetime.datetime = None[source]
updated_at: datetime.datetime = None[source]
id: int[source]
name: str[source]
sku: str[source]
internal_id: str | None[source]
origin_address_id: int | None[source]
new_product: bool[source]
new_expires_at: datetime.datetime | None = None[source]
categories: list[ProductCategory][source]
vendors: list[ProductVendor][source]
active: bool[source]
class brightsites_sdk.ProductVendor(/, **data: Any)[source]

Bases: _BaseModel

Product vendor.

id: int[source]
name: str[source]