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.1.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.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: totango-0.4.1.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.1.tar.gz
Algorithm Hash digest
SHA256 286229cca6526762eb71676906198ea8b5fec3eb4a222d9d3a5d86187dfe2d5f
MD5 aaef1467309e473481bbb878e6607d82
BLAKE2b-256 2b50c60868f336484722ed8c1634921c14ce3b74be470cd5605022d5ab34c3bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for totango-0.4.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: totango-0.4.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d12cceed9d2788356f2369288811023a43bd42ce79f6ab8968e8abc090decd2
MD5 35576669ff86551b2d83b43481563c9c
BLAKE2b-256 33bc440596c751b56574df4f8d01f09a467299493fcbc83ee6bca29625e9a6ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for totango-0.4.1-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