Skip to main content

A Python SDK for Evntaly event tracking platform

Project description

Evntaly Cover

Evntaly

An advanced event tracking and analytics platform designed to help developers capture, analyze, and react to user interactions efficiently.

PyPI version PyPI downloads license

evntaly-python

EvntalySDK is a Python client for interacting with the Evntaly event tracking platform. It provides methods to initialize tracking, log events, identify users, and check API usage limits.

Features

  • Initialize the SDK with a developer secret and project token.
  • Track events with metadata and tags.
  • Identify users for personalization and analytics.
  • Check API usage limits before sending events.
  • Enable or disable tracking globally.

Installation

Install the SDK using pip:

pip install evntaly-sdk

Usage

Initialization

Initialize the SDK with your developer secret and project token:

from evntaly_sdk import EvntalySDK

evntaly = EvntalySDK("YOUR_DEVELOPER_SECRET", "YOUR_PROJECT_TOKEN")

Tracking Events

To track an event:

evntaly.track({
    "title": "Payment Received",
    "description": "User completed a purchase",
    "message": "Order #12345",
    "data": {
        "user_id": "67890",
        "timestamp": "2025-01-08T09:30:00Z",
        "referrer": "social_media",
        "email_verified": True
    },
    "tags": ["purchase", "payment"],
    "notify": True,
    "icon": "💰",
    "apply_rule_only": False,
    "user": {"id": "0f6934fd-99c0-41ca-84f4"},
    "type": "Transaction",
    "sessionID": "20750ebc-dabf-4fd4-9498-443bf30d6095_bsd",
    "feature": "Checkout",
    "topic": "@Sales"
})

Identifying Users

To identify a user:

evntaly.identify_user({
    "id": "0f6934fd-99c0-41ca-84f4",
    "email": "user@example.com",
    "full_name": "John Doe",
    "organization": "ExampleCorp",
    "data": {
        "id": "JohnD",
        "email": "user@example.com",
        "location": "USA",
        "salary": 75000,
        "timezone": "America/New_York"
    }
})

Checking API Usage Limits

Before tracking events, check if you're within API usage limits:

if evntaly.check_limit():
    evntaly.track({"title": "User Login"})
else:
    print("Usage limit reached. Event not tracked.")

Enabling/Disabling Tracking

Control event tracking globally:

evntaly.disable_tracking()  # Disables tracking
evntaly.enable_tracking()   # Enables tracking

License

This project is licensed under the MIT License.


Note: Replace 'YOUR_DEVELOPER_SECRET' and 'YOUR_PROJECT_TOKEN' with actual credentials.

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

evntaly_python-1.0.9.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

evntaly_python-1.0.9-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file evntaly_python-1.0.9.tar.gz.

File metadata

  • Download URL: evntaly_python-1.0.9.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for evntaly_python-1.0.9.tar.gz
Algorithm Hash digest
SHA256 30ec75af09bc281d16d3dac4f65a816043d925249c062b2981abaf6f6fae052d
MD5 a19e5689f5454eb2010e2c9f5a798fc3
BLAKE2b-256 7630dac29d5cbf53ec94f1761a35eca1ca79c00c6085f9bc7231222cd309ea8b

See more details on using hashes here.

File details

Details for the file evntaly_python-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: evntaly_python-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for evntaly_python-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 354ff238ba2c2e01f14da71e95d80a3f6faf977f5021d7e339834f13e08aad2d
MD5 dd15c7aa7cc7f39c11e07a70b726bf2c
BLAKE2b-256 62d74c1187cdd853a568e39bdd214d84562e5bdb0a3a25a4a8f3a1278aafb2be

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