Python tracker setup - thebeansgroup/snowplow GitHub Wiki
HOME > SNOWPLOW SETUP GUIDE > Step 2: setup a Tracker > Python tracker
Contents
The Snowplow Python Tracker lets you add analytics to your Python python-based applications.
The tracker should be relatively straightforward to setup if you are familiar with Python development.
Ready? Let's get started.
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] django 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:
- Minimize external dependencies and third party libraries
- Provide setup instructions
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 pycontracts - Python package that allows to declare constraints on function parameters and return values.
- Requests requests - HTTP library
These dependencies can be installed from the package manager of the host system or through PyPi.
The Snowplow Python Tracker is published to PyPi 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.
To install the Snowplow Python Tracker locally (assuming you already have Pip installed):
$ pip install snowplowtracker
To add the Snowplow Tracker as a dependency to your own Python app, edit your requirements.txt
and add:
snowplowtracker ~> 0.0.1
Done? Now read the Python Tracker API to start tracking events.