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_IDSENTINEL_ANALYTICS_REALM_APP_IDSENTINEL_ANALYTICS_REALM_ENVSENTINEL_ANALYTICS_REALM_INGEST_TOKENSENTINEL_ANALYTICS_REALM_URL(Defaults tohttps://api.sentinelanalyticsrealm.com)
Local release (maintainers)
- Prepare
.envat repo root with at least:PYPI_TOKEN=pypi-...(Upload scope)- Optional GitLab upload:
GITLAB_PROJECT_ID=...GITLAB_USERNAME=...GITLAB_TOKEN=...(PAT with api scope or Deploy Token)
- Run:
scripts/deploy.shto build, validate, and upload.DRY_RUN=true scripts/deploy.shto build + check only.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sentinel_analytics_realm_python-0.0.2.tar.gz.
File metadata
- Download URL: sentinel_analytics_realm_python-0.0.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a21c37cbeeafc1c620f590712b323e4fef37dc3512e0de6a5c20b5ab924085b2
|
|
| MD5 |
f388c8f551552fadc7d195c5d1a5c6f6
|
|
| BLAKE2b-256 |
bfc897d291d2f67c08e64f5ff7a15fbce0d9d5cd9b60c4f257fd331365f92ee4
|
File details
Details for the file sentinel_analytics_realm_python-0.0.2-py3-none-any.whl.
File metadata
- Download URL: sentinel_analytics_realm_python-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15464d836ccc3a4a428514cebb0a22f6be8a8daf3c307d7031ee7ec9b667b381
|
|
| MD5 |
5216090acb8c363362ab1ae78274b99f
|
|
| BLAKE2b-256 |
ca2a75cefe6c0a8bd9ad88529ce18c4de03ae258ad9d21fc376c64f93dd35adf
|