Metadata-Version: 2.4
Name: totango
Version: 0.4.1
Summary: Totango Python tracking client
Author-email: German Bourdin <admin@gbourdin.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/gbourdin/totango-python
Project-URL: Repository, https://github.com/gbourdin/totango-python
Project-URL: Issues, https://github.com/gbourdin/totango-python/issues
Keywords: totango,tracking,analytics
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: ruff>=0.6.0; extra == "dev"
Requires-Dist: setuptools>=69; extra == "dev"
Requires-Dist: tox>=4.21.0; extra == "dev"
Requires-Dist: ty>=0.0.1a15; extra == "dev"
Dynamic: license-file

# totango-python

[![PyPI Version](https://img.shields.io/pypi/v/totango)](https://pypi.org/project/totango/)
[![PyPI License](https://img.shields.io/pypi/l/totango)](https://pypi.org/project/totango/)
[![Python Versions](https://img.shields.io/pypi/pyversions/totango)](https://pypi.org/project/totango/)
[![CI](https://github.com/gbourdin/totango-python/actions/workflows/ci.yml/badge.svg)](https://github.com/gbourdin/totango-python/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/gbourdin/totango-python/graph/badge.svg?branch=master)](https://codecov.io/gh/gbourdin/totango-python)

Python client for Totango's HTTP tracking pixel API.

## Requirements

- Python 3.10+
- `requests`

## Installation

```bash
pip install totango
```

From source:

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

## Quick Usage

```python
import totango

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

## Usage

```python
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:

```bash
python -m unittest discover -s tests -v
```

Run lint and type checks:

```bash
ruff check .
ty check .
```

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

```bash
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.
