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.1.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.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bdapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fb78b566efbefc4f4ac57ee6601cdb394bb08fc1daca45be1975ec9a724e4b5c
MD5 8a43831b5f1b39e7cebdd4e4bc0a8d28
BLAKE2b-256 e270920eb7b7c78b8b32d785276bfe67d1586eeea021bdfde9259edf836c120d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bdapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fabc7e9afbe4d53d281b51c74386431b6d6cec5a2a0116a2d798236a7858b53
MD5 7680473dc970dce88307aa8cbbe869d6
BLAKE2b-256 5b52c180725b18c97324fc8042904585fc53e17de0da445de53d5d7bdf4ae11f

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