Yandex Metrica API data loader
Project description
About the library
A library to download data from Yandex Metrica API.
Installation
pip install YMAPILoader
Code example
How to download data from Yandex Metrica API with this lib:
from YMAPILoader import YMAPILoader
TOKEN = "YOUR API TOKEN"
YM_TRACKER_ID = "123456"
START_DATE = '2022-05-01'
END_DATE = '2022-06-30'
METRICS = 'ym:s:visits'
DIMENSIONS = 'ym:s:referer'
data_params = {
"metrics": METRICS,
"dimensions": DIMENSIONS,
"ids": YM_TRACKER_ID,
"date1": START_DATE,
"date2": END_DATE,
"filters": "ym:s:isRobot=='No'",
"accuracy": '1',
}
data_loader = YMAPILoader(TOKEN, data_params)
data_loader.load_all_data()
data = data_loader.data
It downloads all available data and returns it as a Pandas DataFrame, if no error occures. Please, do not use parameters "limit" and "offset" in data_params.
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
YMAPILoader-0.1.5.tar.gz
(4.4 kB
view details)
File details
Details for the file YMAPILoader-0.1.5.tar.gz
.
File metadata
- Download URL: YMAPILoader-0.1.5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ba8f543d7887235fde82bae1951d110543745fa0aa06b49386d4a339bf7b4ff |
|
MD5 | ba31bc3856cd8b99ef2704a1d02ae987 |
|
BLAKE2b-256 | 6033d4be27fac5af6675bc7530a100d6b22d96833f450694587b3f7e66bc8e79 |