Skip to main content

tbbn-sdk

Python client for the TBBN Platform API. Publish listings, manage offers and trade sessions, and verify webhooks. Python 3.10+, type-hinted throughout, requests is the only dependency. Synchronous.

Install

pip install tbbn-sdk

Quick start

from tbbn_sdk import TbbnClient

client = TbbnClient(base_url="https://api.tbbnetwork.com", api_key="sk_sandbox_...")

listing = client.listings.upsert({
    "merchantId": "...",
    "merchantListingRef": "sku-1042",
    "sellerId": "...",
    "listingType": "BOTH",
    "title": "Nike Air Max 90 — size 10, lightly worn",
    "category": "Apparel",
    "originalPrice": 150,
    "requestedAmount": 25,
    "currency": "USD",
    "visibility": "GLOBAL",
})

offers = client.offers.list(listing["sellerId"], direction="received")

A complete runnable walkthrough is in example/basic.py.

Authentication

Pass either an API key (api_key, issued to your merchant at merchants.tbbnetwork.com) or a session token (access_token, obtained through one of the auth sign-in flows). Sandbox keys (sk_sandbox_…) work against the same API and never touch live data.

Webhooks

Verify every inbound delivery before trusting it. Pass the raw request body exactly as received — re-serialising the JSON changes the bytes and the signature will not match. Signatures are HMAC-SHA256 with a five-minute replay window.

from tbbn_sdk import verify_webhook_signature

ok = verify_webhook_signature(raw_body, request.headers["X-TBBN-Signature"], signing_secret)

Errors

Every non-2xx response throws TbbnApiError with status, code, request_id, the message, and — for some errors — structured details. Quote the request id when asking for help with a specific call.

Resources

auth, merchants, api_keys, oauth_clients, oauth_link, sellers, businesses, branches, business_merchant_links, space, listings, merchant_feed, catalog, media, directory, search, trade_engine, currency, localization, matching, recommendations, offers, trade_sessions, checkout, billing, notifications, webhooks, audit_logs, moderation, fraud, reputation, reviews, analytics, features, sandbox, status. Each method maps one-to-one onto an API endpoint documented in the API reference.

Support

Questions and bug reports: the developer community.

License

MIT © Trade By Barter Network, Inc.

Metadata

Release files for tbbn-sdk 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tbbn-sdk 0.3.0
File Size Uploaded Provenance
tbbn_sdk-0.3.0.tar.gz 11.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tbbn-sdk 0.3.0
File Interpreter ABI Platform
tbbn_sdk-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / tbbn_sdk-0.3.0.tar.gz

Download URL tbbn_sdk-0.3.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cd87bbf2a999e1e492f21981716a703a66a8760b0528e77d6739e4bbf5171a21
BLAKE2b-256 checksum
How to use checksums
c288bf134f6d4d3a90cab8cbc91bf58b9bde05f21b647cf9a16f934514489c00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tbbn_sdk-0.3.0-py3-none-any.whl

Download URL tbbn_sdk-0.3.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97720c697426c355129bdf46a239f07fbec392d0a9d64dc33683e78a36d7c286
BLAKE2b-256 checksum
How to use checksums
15944fb3574c7b4714b73059f1e2eb3cfd7e1952ea72c1aeab2f10209fd8e16b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Security for tbbn-sdk 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tbbn_sdk-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page