Python client for Totango's HTTP tracking pixel API.
- Python 3.10+
requests
pip install totangoFrom source:
git clone [email protected]:gbourdin/totango-python.git
cd totango-python
pip install -e .import totango
tt = totango.Totango("SP-XXXX-XX", user_id="user-123")
tt.track("module", "action")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"})Run the default test suite:
python -m unittest discover -s tests -vRun 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,typeContinuous integration also runs this matrix in GitHub Actions on each push and pull request.