Python API for Amplitude Analytics Logging - https://amplitude.com
This API is a simple (unofficial) wrapper for the Amplitude HTTP API
Potential preparation before installing: create and activate virtualenv or conda environment
pip install amplitude-python
$ git clone https://github.com/kapwing/amplitude-python.git
$ cd amplitude-python
$ pipenv instal
Recommend having a look at Amplitude HTTP API Documentation before start logging.
import amplitude
# initialize amplitude logger
amplitude_logger = amplitude.AmplitudeLogger(api_key='SOME_API_KEY_STRING')
# example event
response = amplitude_logger.log(
device_id='somedeviceid',
event_type='justtesting',
event_properties=dict(property1='somevalue', propertyN='anothervalue')
)
python setup.py test