We are proud to announce the release of our new Snowplow Python Tracker, developed by Snowplow wintern Anuj More. Anuj was one of our two remote interns this winter, joining the Snowplow team from his base in Mumbai to work on making it easy to send events to Snowplow from Python environments.
The Snowplow Python Tracker is a simple PyPI-hosted client library for Snowplow, designed to send raw Snowplow events to a Snowplow collector. Use this tracker to add analytics to your Python and Django apps, webapps and games.
In Anuj’s own words:
In the rest of this post we will cover:
The release version of this tracker (0.1.0) is available on PyPI, the Python Package Index repository as snowplow-tracker.
If you haven’t already, start by downloading and installing the tracker. The easiest way is with pip:
Or with setuptools:
Please note that we currently only support Python 3.3, but we have plans to add support for earlier Python versions soon.
And that’s it! You’re now ready to start using the tracker.
Require the Tracker module in your Python code like so:
You are now ready to initialize a tracker instance:
Now let’s send in a couple of events:
And that’s it! Please check out the Python Tracker documentation on the wiki for the tracker’s full API.
We have big plans for the Snowplow Python Tracker, including but not limited to:
- Adding support for more Python versions
- Improving the public API
- Adding support for batched send of multiple events (e.g. via Redis)
If there are other features you would like to see, feel free to add an issue to the repository.
And that’s it; huge thanks to Anuj More for his work taking the Snowplow Python Tracker from a concept to a packaged initial release! This was Anuj’s first professional development work in Python - and a hugely important release for us.
We hope that you find the Snowplow Python Tracker helpful - it is still very young, so don’t be afraid to get in touch and let us know what features you would like us to add next. And of course, do raise an issue if you spot any bugs!