Skip to main content

Python SDK for Sentinel Analytics Realm

Project description

Sentinel Analytics Realm - Python SDK

Thin Python client for tracking events in the Sentinel Analytics Realm.

Installation

From PyPI (Public Channel)

pip install sentinel-analytics-realm-python

From Source (Local Development)

git clone https://github.com/savant-realms/sentinel-analytics-realm-python.git
cd sentinel-analytics-realm-python
pip install -e .

Usage

from sdk.sdk import SentinelAnalyticsRealmPlugin

# Initialize the plugin
sentinelAnalyticsRealm = SentinelAnalyticsRealmPlugin(
    project_id="YOUR_PROJECT_ID",
    app_id="YOUR_APP_ID",
    ingest_token="YOUR_INGEST_TOKEN"
)

# Track an event
sentinelAnalyticsRealm.track("page_view", visitor_id="v_123")

# Identity linking
sentinelAnalyticsRealm.identify(user_id="u_456", visitor_id="v_123", traits={"email": "user@example.com"})

# Batch tracking
sentinelAnalyticsRealm.track_batch([
    {"name": "click", "visitor_id": "v_123", "properties": {"button": "buy"}},
    {"name": "hover", "visitor_id": "v_123"}
])

Configuration fallback

The SDK will automatically attempt to read configuration from environment variables if not provided in the constructor:

  • SENTINEL_ANALYTICS_REALM_PROJECT_ID
  • SENTINEL_ANALYTICS_REALM_APP_ID
  • SENTINEL_ANALYTICS_REALM_ENV
  • SENTINEL_ANALYTICS_REALM_INGEST_TOKEN
  • SENTINEL_ANALYTICS_REALM_URL (Defaults to https://api.sentinelanalyticsrealm.com)

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

sentinel_analytics_realm_python-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file sentinel_analytics_realm_python-0.0.1.tar.gz.

File metadata

File hashes

Hashes for sentinel_analytics_realm_python-0.0.1.tar.gz
Algorithm Hash digest
SHA256 abf40d454e545e6edd48e8307cf259e2c3bc74a6795ec6fc56201b19d13e7b46
MD5 3402a04ed1c5dffca95fa509304c3fd6
BLAKE2b-256 1c59ae3a4e59f3eb4070b63cda4d877b42256298649f93be3c3f395db8702fd8

See more details on using hashes here.

File details

Details for the file sentinel_analytics_realm_python-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sentinel_analytics_realm_python-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30d426c729440aa78a1d5b09886fce2f6d02da6ca3b466f3dd3c0e787702bbe5
MD5 bbb12cbb6a4a2c9025b0030f895dd596
BLAKE2b-256 d31a526c212d2393a624e0b50ed015c99a5820bd7287981f21c988c5b2b50ea8

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