Skip to content

tirrenotechnologies/tirreno-python-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tirreno Python tracker library

This is the official Python implementation of the tirreno Tracking API.

from tirreno_tracker import Tracker

tirreno_url = "https://example.tld/sensor/" # Sensor URL
tracking_id = "XXX" # Tracking ID

tracker = Tracker(tirreno_url, tracking_id)

event = tracker.create_event()

event.set_user_name('johndoe42') \
    .set_ip_address('1.1.1.1') \
    .set_url('/url') \
    .set_user_agent('Mozilla/5.0 (X11; Linux x86_64)') \
    .set_browser_language('fr-FR,fr;q=0.9') \
    .set_http_method('POST') \
    .set_event_type_account_login()

tracker.track(event)

Requirements

  • Python 3.6+.

Installation

pip

Make sure that pip is installed. Unix-based systems:

python -m ensurepip --upgrade

Windows:

py -m ensurepip --upgrade

Install the tirreno_tracker module.

python -m pip install tirreno_tracker

License

Released under the BSD License. tirreno is a registered trademark of tirreno technologies sàrl, Switzerland.

About

Send event data from your Python application to tirreno open-source security framework.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages