traceiq (Python)
Server-side TraceIQ SDK for Python (3.8+). Pure standard library — no dependencies. Events are queued and flushed in batches by a background thread, so your code never blocks on the network.
Install
pip install traceiq
Quickstart
from traceiq import Client
traceiq = Client(
project_id="YOUR_PROJECT_ID",
write_key="YOUR_WRITE_KEY", # keep server keys secret
endpoint="https://your-traceiq-api.example.com", # defaults to http://localhost:4000
)
# A trustworthy revenue event, straight from your payments service:
traceiq.capture(
"payout_succeeded",
user_id="user_123",
properties={"amount": 50000, "currency": "NGN"},
)
traceiq.identify("user_123", traits={"email": "a@b.com", "kyc_tier": 2})
traceiq.group("org_9", user_id="user_123", traits={"plan": "growth"})
traceiq.shutdown() # flush before a short-lived process exits
The client also registers an atexit flush, so long-running services generally don't
need to call shutdown() explicitly.
API
| Method | Purpose |
|---|---|
capture(event, user_id=None, anonymous_id=None, properties=None, context=None, timestamp=None) |
Track an event. |
identify(user_id, traits=None, timestamp=None) |
Create/update a user profile. |
group(organization_id, user_id=None, anonymous_id=None, traits=None, timestamp=None) |
Associate a user with an account. |
flush() |
Send everything queued now (blocks). |
shutdown() |
Stop the worker and flush. |
Options
endpoint, flush_at (20), flush_interval (10.0s), max_retries (3),
timeout (10.0s), debug (False), on_error (callback).
Delivery is at-most-once; a batch that fails after max_retries is dropped and passed
to on_error. properties["amount"] (a number) powers the dashboard's revenue metrics.
Metadata
Release files for traceiq-py 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| traceiq_py-0.1.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| traceiq_py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / traceiq_py-0.1.0.tar.gz
| Download URL | traceiq_py-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fa4ef47f778c56c25d2b74edc5a161b5c4c6789a39fecec1fb2c2c3873987ea
|
|
BLAKE2b-256 checksum How to use checksums |
fe874ccd1c8c74ef4c66543f9143a8a3490a31b3041ad3f243f7133485d5dfca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / traceiq_py-0.1.0-py3-none-any.whl
| Download URL | traceiq_py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f1fc078bee0d3f906da8d1c3d680090e94ff37f56e759605960731b4b68d3b6
|
|
BLAKE2b-256 checksum How to use checksums |
1c60da15f0b5c07fef7c5877a7c90de8c52122df2c70cef275583c8641f7f1d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|