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, and the message. Quote the request id when asking for help with a specific call.

Resources

auth, merchants, api_keys, sellers, listings, catalog, media, directory, search, trade_engine, currency, localization, matching, recommendations, offers, trade_sessions, checkout, billing, notifications, webhooks, audit_logs, moderation, fraud, reputation, analytics, features, sandbox. 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.

Download files

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

Source Distribution

tbbn_sdk-0.2.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

tbbn_sdk-0.2.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file tbbn_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: tbbn_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tbbn_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4a33eb0cebf49dc0fd505f95617712a35b5c10dcb57bdce6e400ab3201534102
MD5 0a6658e566790e5397b07b59dc6796e6
BLAKE2b-256 644cb4af714758801ae3890574426ce8d003ad95299cee157d0b25a15aeba493

See more details on using hashes here.

Provenance

The following attestation bundles were made for tbbn_sdk-0.2.0.tar.gz:

Publisher: sdk-python-publish.yml on AzaMoney/tbbn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tbbn_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tbbn_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tbbn_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b24ce7540db77bf513cc76d3b95acccf923f8679403f0f95f79ec2d08356742
MD5 2974be312e3a1be5c78aa3f3a4717dd2
BLAKE2b-256 540dbceadb1170f3c164313e238be9c23d28fb8af416512497b88cf141d84e8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tbbn_sdk-0.2.0-py3-none-any.whl:

Publisher: sdk-python-publish.yml on AzaMoney/tbbn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

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