🛰️ bdapi – bitdrift's public API client (Python)
A modern, typed Python client for bitdrift's public API.
✨ Supported APIs
- ✅ Ingestion for server-side funnels
🚀 Installation
pip install bdapi
Or if you're using Poetry:
poetry add bdapi
🔧 Usage
from bdapi import Bitdrift, MetricPlatform
from datetime import datetime
client = Bitdrift(api_key="your-api-key")
client.ingest_metric(
metric_id="signup_event",
platform=MetricPlatform.ANDROID,
app_id="com.example.app",
app_version="1.0.0",
timestamp=datetime.utcnow(),
counter_delta=1,
)
CLI
You can also use the client from the command line for testing as:
$ poetry run cli --help
📦 API Overview
| Method | Description |
|---|---|
ingest_metric() |
Send a counter-based metric to Bitdrift |
All requests are sent to https://api.bitdrift.io via POST using the Connect protocol and application/connect+proto.
🧪 Running Tests
poetry install
poetry run pytest
🔒 Authentication
All API calls require the x-loop-api-key header. Pass your key to the client:
Bitdrift(api_key="...")
📖 Resources
Metadata
Release files for bdapi 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bdapi-0.1.2.tar.gz | 15.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bdapi-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.4 kB
Release files / bdapi-0.1.2.tar.gz
| Download URL | bdapi-0.1.2.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea7889180be30576cc17dfd2affda393c4dc16856651f09a74c0a5d51c0bbfa4
|
|
BLAKE2b-256 checksum How to use checksums |
7219dc33116b97f714ca945b3761e8cd5b376cf1cb482d818aeaa1a6a98fac59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.13 Darwin/24.3.0
|
Release files / bdapi-0.1.2-py3-none-any.whl
| Download URL | bdapi-0.1.2-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd9f2a4100cc86be078f08adbec23241a45bce9d30e909b6f9c8c56eb9b8474e
|
|
BLAKE2b-256 checksum How to use checksums |
879ffb06638b95f115499f99790b1adf86eeffc3e2068b39a2776699abdf9a9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.13 Darwin/24.3.0
|