Official Python SDK for the TrackOfferz reporting API.
Project description
TrackOfferz Python SDK
Official, zero-dependency Python client for the TrackOfferz reporting API.
- Typed — dataclass results, ships with
py.typed. - Zero dependencies — standard library only.
- Resilient — automatic retries on 429 (honours
Retry-After) and transient 5xx. - Network-scoped — every call is limited to your network by the API key.
Install
pip install trackofferz
Authenticate
Create a key in the panel under Settings → API keys (format tofz_sk_…).
from trackofferz import TrackOfferz
client = TrackOfferz(api_key="tofz_sk_...")
Reporting
# Summary (defaults to the last 30 days)
s = client.reports.summary(from_="2026-06-01", to="2026-06-30")
print(s.clicks, s.conversions, s.revenue_cents)
# Breakdown by publisher
for row in client.reports.breakdown(by="publisher"):
print(row.label, row.conversions, row.payout_cents)
# One page of conversions for a campaign
page = client.reports.conversions(campaign_id=5, page=1, page_size=100)
print(page.total, page.has_next)
for c in page.rows:
print(c.transaction_id, c.payout_cents, c.status)
# Stream EVERY click across all pages (auto-pagination)
for click in client.reports.iter_clicks(from_="2026-06-01", to="2026-06-30"):
print(click.transaction_id, click.country_code, click.is_unique)
Money fields are integers in cents (
payout_cents=1250→$12.50). Date params areYYYY-MM-DD.from_has a trailing underscore (fromis a Python keyword) and maps to thefromquery parameter.
Errors
from trackofferz import (
AuthenticationError, ValidationError, RateLimitError, APIError, TrackOfferzError,
)
try:
client.reports.summary(from_="not-a-date")
except ValidationError as e:
print("bad input:", e.message)
except RateLimitError as e:
print("slow down; retry after", e.retry_after, "s")
except TrackOfferzError as e: # base class — catches all of the above
print(e.status, e.code, e.message)
Configuration
TrackOfferz(
api_key="tofz_sk_...",
base_url="https://trackofferz.com/api/v1", # override for self-hosted
timeout=30.0,
max_retries=2,
)
Full API reference: https://trackofferz.com/docs
TrackOfferz is a product by SPTSPL (S. P. Techno Solution Private Limited).
Project details
Release history Release notifications | RSS feed
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 trackofferz-0.1.0.tar.gz.
File metadata
- Download URL: trackofferz-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a277ae50abf6bc3cf287c6e7de08ead879394d115a168022d451264b7541b7be
|
|
| MD5 |
918838bab8b3698c6f779eda4515be91
|
|
| BLAKE2b-256 |
d4f9b219cc04d29d12f2e54eab7a910a73d0f071013427b90c890808b0778b13
|
File details
Details for the file trackofferz-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trackofferz-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af337170259101a8f71ead071bea8acf0b6c2d01fefe9e019ce5c630c1be6de1
|
|
| MD5 |
85afd33f0c14e00f95949c024b031f07
|
|
| BLAKE2b-256 |
7932bb8d529369d5f7f4d264f97616f9d1ff9b8e949a1b96313e213830e0410f
|