python wrapper for using the amplitude analytics and taxonomy APIs
Project description
Amplitude data wrapper
This is a wrapper for Amplitude APIs. You can use it to query and export data from your account and use the taxonomy API.
Why use this package instead of other wrappers?
This package supports regions and so you can use it with Amplitude accounts in the EU and USA.
This package also supports using a proxy so you can keep your project API keys and API secrets confidential.
Supported Amplitude APIs and docs
See examples below and in example.py
Dashboard Rest API
Results from an existing chart
Get data from EU account
from amplitude_data_wrapper import get_chart
r = get_chart(chart_id, api_key, api_secret, region=1)
r.status_code # 200
r.text # print data
Get data from US account
from amplitude_data_wrapper import get_chart
r = get_chart(chart_id, api_key, api_secret, region=2)
r.status_code # 200
r.text # print data
Get data from EU account with a proxy
from amplitude_data_wrapper import get_chart
proxies = {"http": "http://myproxy.domain.org/path"}
r = get_chart(chart_id, api_key, api_secret, region=1, proxy=proxies)
r.status_code # 200
r.text # print data
Privacy API
Delete user data with a deletion job
deleteme = delete_user_data(
user["matches"][0]["amplitude_id"],
email=email,
api_key=api_key,
secret=api_secret,
region=1,
ignore_invalid_id=True,
delete_from_org=False,
)
tobe_deleted = get_deletion_jobs(
start="2022-06-01",
end="2022-07-01",
api_key=api_key,
secret=api_secret,
region=1,
)
Cohort API
proxies = {"http": "http://myproxy.domain.org/path"}
file_path = "path-to/cohortdata.csv"
kull = get_cohort(
api_key,
api_secret,
cohort_id,
filename=file_path,
props=1,
region=1,
proxy=proxies,
)
Export API
Export API - Export your project's event data
start = "20220601T00"
end = "20220601T01"
data = export_project_data(
start=start,
end=end,
api_key=api_key,
secret=api_secret,
filename="path-to/projectdata_eu.zip",
region=1,
)
Taxonomy API
types = get_all_event_types(
api_key=api_key,
secret=api_secret,
region=1)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for amplitude-data-wrapper-0.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2057f39f0b2b3989d7f1169c14f32b475e534c17bd381073a29d6f07c1964ce |
|
MD5 | b91713014cc53d6039f681f21f8a359c |
|
BLAKE2b-256 | 7d31b356a8edf244b80c03cdd730977b211021f6fd9519ad513b92ce20bd2f36 |
Hashes for amplitude_data_wrapper-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6d9c881335ab8e0db37609e4dbac20c39b5001b406b19756a5ac418f948d9d9 |
|
MD5 | b27bd7220654bbd8ad14bf607b789b36 |
|
BLAKE2b-256 | b8c94bb176368bf1431a441a6b74a10da564498388dec068d14322b1ae9f7f12 |