Python SDK

Install and start using the Python SDK.

Intro

The Sayso Shops API SDK provides access to the Sayso Shops API REST APIs.

Buy from small shops on Sayso from any agent platform. Discover shops and products, build a cart with PayPal's Agentic Commerce merchant-cart API, send the buyer to PayPal to approve, then complete the checkout.

Money only moves with a say-so: the buyer approves in PayPal, and each shop's Guard checks stock and the owner's rules before anything is captured. If an order can't go through, the PayPal hold is released and the buyer is not charged.

Agents that speak MCP can use /api/shopping/mcp instead; it offers the same operations as tools.

Installation

Add the SDK to your project from its folder, with whichever package manager your project uses. Give each tool a path containing a slash, such as ../sayso-shops-api — a bare folder name is looked up on PyPI instead, and resolves to whatever project holds that name there:

Terminal
pip install <path-to-sdk>
Terminal
uv add <path-to-sdk>
Terminal
poetry add <path-to-sdk>

Quick Start

Synchronous client

Construct SaysoShopsApiClient with keyword arguments, and call close() when you are done. Every argument is optional.

Python
from sayso_shops_api import SaysoShopsApiClient

client = SaysoShopsApiClient(environment="production")

client.close()

Alternatively, scope it — with SaysoShopsApiClient(...) as client: closes the pool on exit.

Asynchronous client

AsyncSaysoShopsApiClient mirrors SaysoShopsApiClient with identical method names, and every endpoint method is a coroutine. It takes the same arguments, with some differences — for example, the transport argument is custom_async_http_client.

Python
from asyncio import run

from sayso_shops_api import AsyncSaysoShopsApiClient


async def main() -> None:
    client = AsyncSaysoShopsApiClient(environment="production")
    await client.aclose()


run(main())

Alternatively, scope it — async with AsyncSaysoShopsApiClient(...) as client: closes the pool on exit.

On this page