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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a33eb0cebf49dc0fd505f95617712a35b5c10dcb57bdce6e400ab3201534102
|
|
| MD5 |
0a6658e566790e5397b07b59dc6796e6
|
|
| BLAKE2b-256 |
644cb4af714758801ae3890574426ce8d003ad95299cee157d0b25a15aeba493
|
Provenance
The following attestation bundles were made for tbbn_sdk-0.2.0.tar.gz:
Publisher:
sdk-python-publish.yml on AzaMoney/tbbn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tbbn_sdk-0.2.0.tar.gz -
Subject digest:
4a33eb0cebf49dc0fd505f95617712a35b5c10dcb57bdce6e400ab3201534102 - Sigstore transparency entry: 2852610809
- Sigstore integration time:
-
Permalink:
AzaMoney/tbbn@ba31738003ad506be3161fffb7b4225b2489d489 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/AzaMoney
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-publish.yml@ba31738003ad506be3161fffb7b4225b2489d489 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b24ce7540db77bf513cc76d3b95acccf923f8679403f0f95f79ec2d08356742
|
|
| MD5 |
2974be312e3a1be5c78aa3f3a4717dd2
|
|
| BLAKE2b-256 |
540dbceadb1170f3c164313e238be9c23d28fb8af416512497b88cf141d84e8a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tbbn_sdk-0.2.0-py3-none-any.whl -
Subject digest:
1b24ce7540db77bf513cc76d3b95acccf923f8679403f0f95f79ec2d08356742 - Sigstore transparency entry: 2852610875
- Sigstore integration time:
-
Permalink:
AzaMoney/tbbn@ba31738003ad506be3161fffb7b4225b2489d489 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/AzaMoney
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-publish.yml@ba31738003ad506be3161fffb7b4225b2489d489 -
Trigger Event:
workflow_dispatch
-
Statement type: