Browse docs

Jump to core topics without leaving the page.

Python SDK

Send server-side events from Python applications and services.

The Python SDK is built for backend tracking in Django, Flask, FastAPI, and background workers.

Best for

  • Server-side tracking for APIs and jobs
  • Backends that need reliable event delivery
  • Teams measuring conversions outside the browser

Install

Install the SDK and configure your client credentials.

Install FlashAnalytics

Initialize

from flash_analytics import client

fa = client.FlashAnalytics(
    app_id="YOUR_CLIENT_ID",
    secret_key="YOUR_CLIENT_SECRET",
)

Track events

fa.track("invoice_paid", {
    "revenue": 299.0,
    "currency": "USD",
    "plan": "enterprise",
})

Delivery tips

  • Send events asynchronously for request performance
  • Retry on transient network failures
  • Log failed responses in your app logs