Skip to main content

No project description provided

Project description

🛰️ 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bdapi-0.1.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bdapi-0.1.2-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file bdapi-0.1.2.tar.gz.

File metadata

  • Download URL: bdapi-0.1.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.13 Darwin/24.3.0

File hashes

Hashes for bdapi-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ea7889180be30576cc17dfd2affda393c4dc16856651f09a74c0a5d51c0bbfa4
MD5 ef3330c97255853124334a3779928081
BLAKE2b-256 7219dc33116b97f714ca945b3761e8cd5b376cf1cb482d818aeaa1a6a98fac59

See more details on using hashes here.

File details

Details for the file bdapi-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: bdapi-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.13 Darwin/24.3.0

File hashes

Hashes for bdapi-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cd9f2a4100cc86be078f08adbec23241a45bce9d30e909b6f9c8c56eb9b8474e
MD5 24ade635125c5f3da9b23a511a1a8d1b
BLAKE2b-256 879ffb06638b95f115499f99790b1adf86eeffc3e2068b39a2776699abdf9a9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page