This release is a pre-release and may not be stable for production use.
billdogeng (Python)
Official BilldogEng server SDK for Python — the engagement suite for server-side use: Analytics, Feature Flags (remote + local evaluation), Surveys (data API), Messaging dispatch, and LLM observability.
This is the Python port of the canonical Node reference SDK; the wire protocol
and method surface are identical across all billdogeng-* server SDKs.
Install
pip install billdogeng==1.1.1-beta.4
Zero runtime dependencies (stdlib only). Requires Python 3.8+.
Quickstart
from billdogeng import BilldogEng
bd = BilldogEng("bd_test_xxx", local_evaluation=True)
# Analytics (batched + background flush + gzip + retry)
bd.capture("user-123", "order_completed", {"revenue": 49.99}, {"company": "acme"})
bd.identify("user-123", {"email": "a@b.com", "plan": "pro"})
bd.group_identify("company", "acme", {"seats": 50})
bd.alias("user-123", "anon-abc")
# Feature flags (local evaluation = deterministic murmurhash3 bucketing)
if bd.is_feature_enabled("new_checkout", "user-123"):
...
variant = bd.get_feature_flag("pricing_test", "user-123")
payload = bd.get_feature_flag_payload("pricing_test", "user-123")
all_flags = bd.get_all_flags("user-123")
# Surveys (data API — no rendering)
surveys = bd.surveys.list("user-123")
config = bd.surveys.fetch(survey_id, "user-123")
started = bd.surveys.start(survey_id, {"customer_id": "user-123"})
bd.surveys.submit(survey_id, [{"question_id": q, "answer_number": 9}],
{"respondent_id": started["respondent_id"]})
# Messaging dispatch (Bearer JWT auth)
bd.messaging.dispatch(
project_id="…", channel="push",
content={"title": "Hi", "body": "There"},
access_token="<supabase-jwt>",
targeting={"type": "all"},
scheduling={"deliveryType": "immediate"},
)
# LLM observability
bd.llm.capture_trace(
trace_id="t-1", span_id="s-1", model="claude-opus-4-8",
input_text="…", output_text="…",
prompt_tokens=10, completion_tokens=5, duration_ms=123, cost_usd=0.002,
)
bd.shutdown() # flushes remaining events + stops the background timer
# Or as a context manager:
with BilldogEng("bd_test_xxx") as bd:
bd.capture("user-123", "page_view")
Configuration
| Option | Default | Description |
|---|---|---|
host |
https://api.billdog.io/v1 |
Base URL for all requests |
flush_at |
20 |
Batch size that triggers a flush |
flush_interval |
10000 |
Background flush cadence (ms) |
max_queue_size |
1000 |
Max queued events before oldest are dropped |
gzip |
True |
Gzip request bodies large enough to benefit |
local_evaluation |
False |
Enable local (server-side) flag evaluation |
request_timeout |
10000 |
Per-request timeout (ms) |
max_retries |
3 |
Retry attempts for 5xx / network errors |
Auth: X-BillDog-API-Key: <apiKey> on every request (bd_test_* sandbox /
bd_live_* live). Messaging dispatch authenticates with a Bearer JWT instead.
Tests
python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest -q
The suite covers: batching (10 captures → 1 POST), identify/group/alias event shapes, the 12 canonical murmurhash3 vectors + rollout/targeting/multivariate evaluation, 503-then-200 retry with backoff (local stub server), and the survey round-trip + messaging dispatch + LLM trace payload shapes.
BillDog Auth
Session-token verification is not available in this SDK yet.
billdogeng-node is the only
server SDK that can verify a BillDog Auth token offline today.
Until it lands here, either verify in a Node service, or call the
auth-introspect endpoint over HTTP — that costs a network round-trip per
check, and in exchange tells you whether the session is live right now rather
than only that the token was valid when it was issued.
Metadata
Release files for billdogeng 1.1.1b4
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 | |
|---|---|---|---|---|
| billdogeng-1.1.1b4.tar.gz | 54.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| billdogeng-1.1.1b4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 96.2 kB
Release files / billdogeng-1.1.1b4.tar.gz
| Download URL | billdogeng-1.1.1b4.tar.gz |
|---|---|
| Size | 54.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05ae9e7f04e6a5a6bf13b6c8dec72038440f6da3a7851ca5ce9483dddef0b128
|
|
BLAKE2b-256 checksum How to use checksums |
e077a11fd256f611f7aad3f0b8881d39a64eb25b94c84e5306300a48b8e36bfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / billdogeng-1.1.1b4-py3-none-any.whl
| Download URL | billdogeng-1.1.1b4-py3-none-any.whl |
|---|---|
| Size | 42.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
482504c334f8a4760c9d063e7dd0bfb56a269cb71828e147bf5efa3cbe32a569
|
|
BLAKE2b-256 checksum How to use checksums |
0a2a4b9c36355cd1b67a3cc975334a4d74d7d5d4004cacfbe6bde04d829cf11d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for billdogeng 1.1.1b4
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.