No project description provided
Project description
[![CircleCI](https://circleci.com/gh/atveit/amplitude-python.svg?style=svg&circle-token=dfb7391f33d23ac3dad467b60ca34b36e7a37ebb)](https://circleci.com/gh/atveit/amplitude-python)
# amplitude-python
Python API for Amplitude Analytics Logging - https://amplitude.com
This API is a simple (unofficial) wrapper for the [Amplitude HTTP API](https://amplitude.zendesk.com/hc/en-us/articles/204771828-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
```bash
pip install amplitude-python
```
### 1.2 Install from github
```bash
$ git clone https://github.com/atveit/amplitude-python.git
$ cd amplitude-python
$ python setup.py instal
```
## 2. Logging to Amplitude with amplitude-python
Recommend having a look at [Amplitude HTTP API Documentation](https://amplitude.zendesk.com/hc/en-us/articles/204771828-HTTP-API) before start logging.
```python
import amplitude
# initialize amplitude logger
amplitude_logger = amplitude.AmplitudeLogger(api_key = "SOME_API_KEY_STRING")
# example event
event_args = {"device_id":"somedeviceid", "event_type":"justtesting",
"event_properties":{"property1":"somevalue", "propertyN":"anothervalue"}
event = amplitude_logger.create_event(**event_args)
# send event to amplitude
amplitude_logger.log_event(event)
```
## 3. Test amplitude-python module
```
python setup.py test
```
# amplitude-python
Python API for Amplitude Analytics Logging - https://amplitude.com
This API is a simple (unofficial) wrapper for the [Amplitude HTTP API](https://amplitude.zendesk.com/hc/en-us/articles/204771828-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
```bash
pip install amplitude-python
```
### 1.2 Install from github
```bash
$ git clone https://github.com/atveit/amplitude-python.git
$ cd amplitude-python
$ python setup.py instal
```
## 2. Logging to Amplitude with amplitude-python
Recommend having a look at [Amplitude HTTP API Documentation](https://amplitude.zendesk.com/hc/en-us/articles/204771828-HTTP-API) before start logging.
```python
import amplitude
# initialize amplitude logger
amplitude_logger = amplitude.AmplitudeLogger(api_key = "SOME_API_KEY_STRING")
# example event
event_args = {"device_id":"somedeviceid", "event_type":"justtesting",
"event_properties":{"property1":"somevalue", "propertyN":"anothervalue"}
event = amplitude_logger.create_event(**event_args)
# send event to amplitude
amplitude_logger.log_event(event)
```
## 3. Test amplitude-python module
```
python setup.py test
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amplitude-python-0.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for amplitude_python-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c84ead49ebaf1c17b5e2b48362ea3feb8459dd2637b3f1e697edb5f11e1728 |
|
MD5 | b91e96b55465157ade1a9f7cf2d1234e |
|
BLAKE2b-256 | 13ea27900f5ad24924f6e24f4e236e791ba75c44e122b8f4258d0f592c7eeac6 |