SDK for Amplitude API: https://developers.amplitude.com/docs
-
=Python 3.7.5
pip install amplitude_sdk
To provide a python API client for Amplitude API. (More clients to be implemented)
HTTP API V2 - to be implemented
Batch Event Upload API - to be implemented
Identify API - to be implemented
Attribution API - to be implemented
Behavioral Cohorts API - list_cohorts, download_cohort, create_cohorts, modify_membership
Chart Annotations API - to be implemented
Dashboard REST API - to be implemented
Export API - to be implemented
Group Identify API - to be implemented
Releases API - to be implemented
SCIM API - to be implemented
Taxonomy API - to be implemented
User Privacy API - to be implemented
User Profile API - to be implemented
Requesting Behavioral Cohorts API
from amplitude_sdk import BehavioralCohortsClient
b = BehavioralCohortsClient(
api_key='xxxxxxx',
secret='yyyyyyyy')
b.list_cohorts()
Result from response type: forecast and forecastHourly
{'cohorts': [{'appId': 6666666,
'archived': False,
'definition': {'version': 2,
'countGroup': 'User',
'cohortType': 'UNIQUES',
'andClauses': [{'negated': False,
'orClauses': [{'type': 'event',
'time_type': 'rolling',
'time_value': 30,
'offset': 0,
'interval': 1,
'type_value': 'customer-purchase',
'operator': '>=',
'operator_value': 2,
'group_by': [],
'metric': None,
'event_props': [{'group_type': 'User',
'filter_type': 'event',
'type': 'orderMethod',
- Paulo Kuong (@pkuong)