Skip to content

miermans/aio-snowplow-python-tracker

 
 

Repository files navigation

asyncio Python Analytics for Snowplow

Build Status Test Coverage http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat

Pypi Snowplow Tracker Python Versions Monthly Downloads

Overview

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.

Example

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())

Installation

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

$ pip install aio-snowplow-tracker --upgrade

To install the Snowplow Tracker with extras:

# Redis extra
$ pip install aio-snowplow-tracker[redis]
# Celery extra
$ pip install aio-snowplow-tracker[celery]

Find out more

The official Snowplow Python Tracker documentation is applicable to this library as well, with some minor changes:

  1. import aio_snowplow_tracker instead of import snowplow_tracker.
  2. await Tracker calls.
Technical Docs Contributing
techdocs contributing
Technical Docs Contributing

Maintainer Quickstart

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

Copyright and license

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.

About

Asyncio Snowplow event tracker for Python. Add analytics to your Python and Django apps, webapps and games

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 97.8%
  • Shell 1.9%
  • Dockerfile 0.3%