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-py
The package installs as traceiq-py and imports as 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. |
alias(user_id, previous_id, timestamp=None) |
Link another ID for the same person (e.g. a guest ID) to user_id. |
group(organization_id, user_id=None, anonymous_id=None, traits=None, timestamp=None) |
Associate a user with an account. |
log(level, message, service=None, user_id=None, error=None, **metadata) |
Send a structured line to Logs. level is debug, info, warn, error or fatal. |
is_feature_enabled(key, distinct_id, default=False, properties=None, environment=None, track_exposure=True) |
Whether a feature flag is on for a user. Returns default if flags can't be evaluated. |
get_feature_flag_payload(key, distinct_id, default=None, ...) |
A flag's remote-config payload when it is on, else default. |
evaluate_flags(distinct_id, properties=None, environment=None) |
Every flag for a user: {"flags", "payloads", "details"}. |
track_flag_exposure(key, distinct_id, enabled, environment=None, properties=None) |
Record a flag exposure yourself (the helpers above do it unless track_exposure=False). |
flush() |
Send everything queued now (blocks). |
shutdown() |
Stop the worker and flush. |
traceiq.log("error", "Payout provider timed out", provider="stripe", error=exc)
if traceiq.is_feature_enabled("new-payouts", "user_123", properties={"plan": "pro"}):
...
Flag calls are synchronous HTTP requests (one per call), so evaluate once per request and
reuse the result, for example with evaluate_flags().
Options
endpoint, flush_at (20), flush_interval (10.0s), max_retries (3),
timeout (10.0s), debug (False), on_error (callback), service_name ("server") and
environment ("production") stamped on log lines.
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.2.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 | Provenance | Actions |
|---|---|---|---|---|
| traceiq_py-0.2.0.tar.gz | 9.2 kB | With provenance | Details for traceiq_py-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| traceiq_py-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for traceiq_py-0.2.0-py3-none-any.whl |
Total release size: 16.2 kB
Release files / traceiq_py-0.2.0.tar.gz
| Download URL | traceiq_py-0.2.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da97a48095afa119e201ffa46f0bb742aaf2029f780dd1a68203898994773adc
|
|
BLAKE2b-256 checksum How to use checksums |
3bd87d97c1edec67a5964b34b5a4a524a81d03eb941a3a3247c1cd948087c527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 25, 2026.
Transparency logRelease files / traceiq_py-0.2.0-py3-none-any.whl
| Download URL | traceiq_py-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efe2babfcc0b84c6c3855f54810d5eb9dc0971cf5da4a5ae4b5c7718c5bac392
|
|
BLAKE2b-256 checksum How to use checksums |
f33b532facc804df40f3cff6f6c7a406679461d0952647cb1f7e7462dd3d929a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 25, 2026.
Transparency logSecurity for traceiq-py 0.2.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
Both files in this release have been uploaded with provenance metadata.
Attestation for traceiq_py-0.2.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 Oct 25, 2026.
Transparency logA 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.