Skip to content

DataGreed/amplitude-python-2

 
 

Repository files navigation

CircleCI

amplitude-python

Python API for Amplitude Analytics Logging - https://amplitude.com

This API is a simple (unofficial) wrapper for the Amplitude HTTP API

1. Install amplitude-python

Potential preparation before installing: create and activate virtualenv or conda environment

1.1 Install from pypi with conda or pip

pip install amplitude-python

1.2 Install from github

$ git clone https://github.com/atveit/amplitude-python.git
$ cd amplitude-python
$ python setup.py instal

2. Logging to Amplitude with amplitude-python

import amplitude	

# initialize amplitude logger
amplitude_logger = amplitude.AmplitudeLogger(api_key = "SOME_API_KEY_STRING")

# track an event to amplitude
amplitude_logger.track(device_id="somedeviceid", event_type:"Registration", event_properties={"screen": "First"}, user_properties={"email": "[email protected]"})

API Reference can be found here – Amplitude HTTP API Documentation before start logging.

3. Test amplitude-python module

python setup.py test

About

Python API for Amplitude Analytics Logging - https://amplitude.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.6%
  • Shell 2.4%