This is a fork of to the official Snowplow Python Tracker that leverages asyncio for high-performance event tracking.
With this tracker you can collect event data from your Python-based applications, games or Python web servers/frameworks.
from aio_snowplow_tracker import Tracker, Emitter, Subject
import asyncio
async def main():
e = Emitter('d3rkrsqld9gmqf.cloudfront.net')
s = Subject().set_user_id('5432')
t = Tracker(e, subject=s, app_id='example-app')
await t.track_page_view('http://example.com', 'Title')
asyncio.run(main())To install the Snowplow Python Tracker locally, assuming you already have Pip installed:
$ pip install aio-snowplow-tracker --upgradeTo install the Snowplow Tracker with extras:
# Redis extra
$ pip install aio-snowplow-tracker[redis]
# Celery extra
$ pip install aio-snowplow-tracker[celery]The official Snowplow Python Tracker documentation is applicable to this library as well, with some minor changes:
import aio_snowplow_trackerinstead ofimport snowplow_tracker.awaitTracker calls.
| Technical Docs | Contributing |
|---|---|
![]() |
![]() |
| Technical Docs | Contributing |
Assuming pyenv is installed
host$ git clone git@github.com:snowplow/snowplow-python-tracker.git host$ cd snowplow-python-tracker host$ pyenv install 3.7.11 && pyenv install 3.8.11 && pyenv install 3.9.6 host$ ./run-tests.sh deploy host$ ./run-tests.sh test
The Snowplow Python Tracker is copyright 2013-2021 Snowplow Analytics Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

