Skip to main content

WebAZ Python SDK — connect any Python agent to the WebAZ agent-native commerce protocol over Remote MCP.

Project description

WebAZ Python SDK

Connect any Python agent to WebAZ — the agent-native commerce protocol — in one import, over Remote MCP. No local process, no boilerplate. Anonymous for reads; an api_key for writes.

Install

pip install webaz

Quick start (5 minutes, no account)

import asyncio
from webaz import WebAZ

async def main():
    async with WebAZ() as wz:            # anonymous — public read-only tools
        print(await wz.tools())          # 42+ tool names
        catalog = await wz.browse()      # list the catalog (filters + no query)
        for p in catalog["products"]:
            print(p["title"], "$", p["price"])

asyncio.run(main())

Run the full demo: python -m webaz isn't needed — just:

python examples/demo_agent.py

Search vs browse

webaz_search is strict — a query matches only an exact title/SKU. A natural-language query returns found: 0 with a recovery object (a labeled catalog sample + a machine-actionable next_step), so your agent never hits a dead end:

await wz.search("Alloy Dual-Sided Tri-Axis Magnetic Ring Stand Metal Phone Holder")  # exact → 1 hit
await wz.search("desktop phone stand")   # → found:0 + result["recovery"]["catalog_sample"]
await wz.browse(sort="newest", limit=5)  # discover by browsing (no query)

Authenticated (writes)

async with WebAZ(api_key="wz...") as wz:   # acts as your account
    ...                                    # order / list / fulfil

Risk actions (pay, ship, arbitrate) return an approve_url you confirm with your Passkey in the browser — the endpoint never bypasses the human gate. Get an invite for an api_key at https://webaz.xyz/#welcome.

API

method what
await wz.tools() list tool names
await wz.call(tool, **args) call any tool, returns parsed JSON
await wz.info() protocol status + network state
await wz.search(query, **filters) strict search (exact title/SKU)
await wz.browse(sort="newest", **filters) browse the catalog (no query)
await wz.price_history(product_id) product price/volume history

How it connects

A thin wrapper over the official MCP Python SDK Streamable HTTP client, pre-wired to https://webaz.xyz/mcp. Same 42-tool surface as every other WebAZ client. Full transport/auth details: https://webaz.xyz/docs/REMOTE-MCP.md. Connect any other client (Claude, ChatGPT, Cursor, Inspector): https://webaz.xyz/#connect.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webaz-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webaz-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file webaz-0.1.0.tar.gz.

File metadata

  • Download URL: webaz-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for webaz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ebb369500e2aba7714f3474bbb0c8bd04c7d0ccdcbfc0bdabd9725a92e9af782
MD5 3fb3f4504fc556072bc807ab7c8b5e94
BLAKE2b-256 3b5587c765f8040747a2ee95d09fc67452da2061006ef4fafee7b6a453ae107d

See more details on using hashes here.

File details

Details for the file webaz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: webaz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for webaz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ec3632469a1760ca9f2015f28e79320f689df6a2046d8c5ab6f1ba5be9c208c
MD5 2a49178e3bae6da04797fc4abc807458
BLAKE2b-256 376fea79ea47e0c2acffac9e297ba53242e9f2e7e4c93e27cb4812e8bd906cc2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page