Skip to main content

Totango Python tracking client

Project description

totango-python

PyPI Version PyPI License Python Versions CI codecov

Python client for Totango's HTTP tracking pixel API.

Requirements

  • Python 3.10+
  • requests

Installation

pip install totango

From source:

git clone git@github.com:gbourdin/totango-python.git
cd totango-python
pip install -e .

Quick Usage

import totango

tt = totango.Totango("SP-XXXX-XX", user_id="user-123")
tt.track("module", "action")

Usage

import totango

tt = totango.Totango(
    "SP-XXXX-XX",
    user_id="user-123",
    user_name="Jane User",
    account_id="acct-1",
    account_name="Acme Inc",
)

# Track an activity event
tt.track("dashboard", "opened", user_opts={"plan": "gold"})

# Send an identify-style update without activity module/action
tt.send(account_opts={"tier": "enterprise"})

Development

Run the default test suite:

python -m unittest discover -s tests -v

Run lint and type checks:

ruff check .
ty check .

Run the multi-version matrix with tox (3.10 through 3.15):

tox -e py310,py311,py312,py313,py314,py315
tox -e lint,type

Continuous integration also runs this matrix in GitHub Actions on each push and pull request.

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

totango-0.4.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

totango-0.4.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file totango-0.4.0.tar.gz.

File metadata

  • Download URL: totango-0.4.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for totango-0.4.0.tar.gz
Algorithm Hash digest
SHA256 15c7c90ee897539e6901b111402db871ca87e82c46e8193a6de5294f517fa6e0
MD5 a0d017e24abd201d8165d74ef46c76eb
BLAKE2b-256 97cb01334952fc9588cb09e19fa111ff462ebb540fc8bb74ba84e66e36aa849b

See more details on using hashes here.

Provenance

The following attestation bundles were made for totango-0.4.0.tar.gz:

Publisher: release.yml on gbourdin/totango-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file totango-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: totango-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for totango-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea6b5fed760fc6556a4deb8b0c70eef0907068f4f42a9702436ea12fb3f0b10f
MD5 845538bb18cf6e1674e2f4da6c28db77
BLAKE2b-256 31fddc4a823bd394b7736dff4350c064d50bf287d62a7600fc8f81ddbf077783

See more details on using hashes here.

Provenance

The following attestation bundles were made for totango-0.4.0-py3-none-any.whl:

Publisher: release.yml on gbourdin/totango-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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