Skip to main content

Official Python Middleware for Helm Analytics

Project description

Helm Analytics Python SDK

Official Python middleware for Helm Analytics. Track server-side events, verify traffic quality, and bypass ad-blockers by ingesting data directly from your backend.

Installation

pip install helm-analytics

Quick Start (FastAPI)

from fastapi import FastAPI
from starlette.middleware.base import BaseHTTPMiddleware
from helm_analytics import HelmAnalytics

app = FastAPI()

# Initialize Helm
helm = HelmAnalytics(site_id="YOUR_SITE_ID_HERE")

# Register Middleware
app.add_middleware(BaseHTTPMiddleware, dispatch=helm.fastapi_dispatch)

@app.get("/")
def home():
    return {"message": "Hello World"}

Features

  • Non-blocking: Uses background threads to send data without slowing down your app.
  • Bot Detection: Passes server context (IP, User-Agent) for deeper analysis.
  • Fail-safe: Failures in tracking do not crash your application.

Configuration

You can also set the Site ID via environment variable:

export HELM_SITE_ID="your-uuid"

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

helm_analytics-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

helm_analytics-1.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file helm_analytics-1.0.1.tar.gz.

File metadata

  • Download URL: helm_analytics-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for helm_analytics-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a8077ea65920140ac0b19990e87d757472d409e431b54606a59c32ccc6af2125
MD5 f0a2ed04d76a7050a850f1cd446a4b98
BLAKE2b-256 024914e662c27c50fc266a50f73771cda654304c92e936f34d3ba0006c41fd7a

See more details on using hashes here.

File details

Details for the file helm_analytics-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: helm_analytics-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for helm_analytics-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff385b3c43abf93d8ccf8169f9626e14c293e34efda1040f2bed5b53f87c0398
MD5 fec1b3a06f1706ce338c7f3f053616e7
BLAKE2b-256 9ded17e1ba7d72ce43c7ee33b4ac447602b02329f5b5c1ae963f36c2297fdcac

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