Python Analytics SDK setup - OXYGEN-MARKET/oxygen-market.github.io GitHub Wiki

HOME » SNOWPLOW TECHNICAL DOCUMENTATION » Snowplow Analytics SDK » Python Analytics SDK setup

Contents

  1. Overview
  2. Compatibility
  3. Setup
    3.1 PyPi
    3.2 pip
    3.3 easy_install

1. Overview

The Snowplow Analytics SDK for Python lets you work with Snowplow enriched events in your Python event processing, data modeling and machine-learning jobs. You can use this SDK with Apache Spark, AWS Lambda, and other Python-compatible data processing frameworks.

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

2. Compatibility

Snowplow Python Analytics SDK was tested with Python of versions: 2.7, 3.3, 3.4, 3.5.

As analytics SDKs supposed to be used heavily in conjunction with data-processing engines such as Apache Spark, our goal is to maintain compatibility with all versions that PySpark supports. Whenever possible we try to maintain compatibility with broader range of Python versions and computing environments. This is achieved mostly by minimazing and isolating third-party dependencies and libraries.

There are only one external dependency currently:

  • Boto3 - AWS Python SDK that used to provide access to Event Load Manifests.

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 Analytics SDK is published to PyPI, the the official third-party software repository for the Python programming language.

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

3.2 pip

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

$ pip install snowplow_analytics_sdk --upgrade

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

snowplow_analytics_sdk==0.2.0

3.3 easy_install

If you are still using easy_install:

$ easy_install -U snowplow_analytics_sdk

Done? Now read the Python Analytics SDK API to start analyzing events data.

⚠️ **GitHub.com Fallback** ⚠️