Skip to content

altertable-ai/altertable-python

Altertable Python SDK

Official Python SDK for Altertable Product Analytics.

Installation

You can install the package via pip:

pip install altertable

Or using poetry:

poetry add altertable

Usage

Initialization

from altertable import Altertable

client = Altertable("your_api_key")

Tracking Events

client.track(
    event="button_clicked",
    distinct_id="user_123",
    options={
        "properties": {
            "button_id": "signup_btn",
            "page": "home"
        }
    }
)

Identifying Users

client.identify(
    distinct_id="user_123",
    options={
        "traits": {
            "email": "user@example.com",
            "name": "John Doe"
        },
        "anonymous_id": "previous_anon_id"
    }
)

Alias

client.alias(
    distinct_id="previous_anonymous_id",
    new_user_id="new_user_id"
)

License

The package is available as open source under the terms of the MIT License.

About

Altertable's Product Analytics Python API Client

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages