Python tracker setup

Egor Abramov edited this page Apr 28, 2017 · 5 revisions

HOME > SNOWPLOW SETUP GUIDE > Step 2: setup a Tracker > Python tracker

Contents

1. Overview

The Snowplow Python Tracker lets you add analytics to your Python-based applications.

The tracker should be relatively straightforward to setup if you are familiar with Python development.

Ready? Let's get started.

Back to top

2. Integration options

2.1 Tracker compatibility

As a programming language that lets you work more quickly and integrate your systems more effectively, Python is available in a huge number of different computing environments and platforms, from Civilization IV through Django framework to Ubuntu One.

To make the Snowplow Python Tracker work out-of-the-box with as many different Python programs as possible, we have tried to:

  1. Minimize external dependencies and third party libraries
  2. Provide setup instructions

Back to top

2.2 Dependencies

To make the Snowplow Python Tracker work with as many different Python programs as possible, we have tried to keep external dependencies to a minimum. There are only two external dependencies currently:

  • PyContracts - Python package that allows one to declare constraints on function parameters and return values.
  • Requests - HTTP library

These dependencies can be installed from the package manager of the host system or through PyPi.

Back to top

3. Setup

3.1 PyPI

The Snowplow Python Tracker is published to PyPI, the the official third-party software repository for the Python programming language.

This makes it easy to either install the tracker locally, or to add it as a dependency into your own Python app.

3.2 pip

To install the Snowplow Python Tracker locally, assuming you already have Pip installed:

$ pip install snowplow-tracker --upgrade

To add the Snowplow Tracker as a dependency to your own Python app, edit your requirements.txt and add:

snowplow-tracker ~> 0.8.0

3.3 easy_install

If you are still using easy_install:

$ easy_install -U snowplow-tracker

Done? Now read the Python Tracker API to start tracking events.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.