All Projects → pikhovkin → yametrikapy

pikhovkin / yametrikapy

Licence: MIT license
Python library for Yandex Metrika API

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to yametrikapy

vue-yandex-metrika
Vue plugin for Yandex Metrika
Stars: ✭ 64 (+220%)
Mutual labels:  yandex, yandex-metrika
Awesome-meta-tags
📙 Awesome collection of meta tags
Stars: ✭ 18 (-10%)
Mutual labels:  yandex
Clickhouse Sqlalchemy
ClickHouse dialect for SQLAlchemy
Stars: ✭ 166 (+730%)
Mutual labels:  yandex
mapkit-android-demo
MapKit Android demo
Stars: ✭ 92 (+360%)
Mutual labels:  yandex
Cloudcross
CloudCross it's opensource crossplatform software for syncronization a local files and folders with many cloud providers. On this moment a Cloud Mail.Ru, Yandex.Disk, Google drive, OneDrive and Dropbox support is available
Stars: ✭ 185 (+825%)
Mutual labels:  yandex
xiachufang-api
下厨房 API
Stars: ✭ 53 (+165%)
Mutual labels:  api-service
Dynamictranslator
Instant translation application for windows in .NET 🎪
Stars: ✭ 131 (+555%)
Mutual labels:  yandex
yandex-direct-client
Lightweight and useful Yandex Direct API version 5 client
Stars: ✭ 16 (-20%)
Mutual labels:  yandex
pyaspeller
Python text speller
Stars: ✭ 26 (+30%)
Mutual labels:  yandex
yadisk
Download file from Yandex.Disk through share link
Stars: ✭ 33 (+65%)
Mutual labels:  yandex
django-yaturbo
Reusable Django app to enable Yandex Turbo Pages for your site
Stars: ✭ 13 (-35%)
Mutual labels:  yandex
Sitedorks
Search Google/Bing/Ecosia/DuckDuckGo/Yandex/Yahoo for a search term with a default set of websites, bug bounty programs or a custom collection.
Stars: ✭ 221 (+1005%)
Mutual labels:  yandex
butdr
Backup to Cloud( Google Drive, Dropbox ... ) use rclone
Stars: ✭ 49 (+145%)
Mutual labels:  yandex
Rust S3
Rust library for interfacing with AWS S3 and other API compatible services
Stars: ✭ 177 (+785%)
Mutual labels:  yandex
coronavirus-dashboard-api-R-sdk
Coronavirus (COVID-19) in the UK - API Service SDK for R
Stars: ✭ 23 (+15%)
Mutual labels:  api-service
Clickhouse Net
Yandex ClickHouse fully managed .NET client
Stars: ✭ 142 (+610%)
Mutual labels:  yandex
Deep Translator
A flexible free and unlimited python tool to translate between different languages in a simple way using multiple translators.
Stars: ✭ 233 (+1065%)
Mutual labels:  yandex
yii2-stat
Yii2 Multi Web Statistic Module (yametrika, google-analytic, own db-counter)
Stars: ✭ 18 (-10%)
Mutual labels:  yandex-metrika
ekstertera
Linux GUI клиент для работы с Яндекс.Диск (Yandex.Disk) через REST API
Stars: ✭ 33 (+65%)
Mutual labels:  yandex
ngx-metrika
Angular Yandex Metrika (Модуль поддержки счетчиков Яндекс Метрика для Angular 6+)
Stars: ✭ 13 (-35%)
Mutual labels:  yandex-metrika

yametrikapy

PyPI PyPI - Python Version PyPI - License

The library support only JSON format.

To sign in you need client_id, get it from https://tech.yandex.ru/oauth/doc/dg/tasks/register-client-docpage for your application.

To connect to Yandex.Metric, you need to get a code:

from yametrikapy import Metrika


client_id = '6993a3cd88e34ac67574578th87h67r7fe341c'
client_secret = 'AQAg4h45h4DJk4545gBDqIln6hNJGet45DHJgVxCjncQ'
code = '3463468'

metrika = Metrika(client_id, client_secret=client_secret, code=code)

or to obtain a debug token manually.

from yametrikapy import Metrika


client_id = '6993a3cd88e34ac67574578th87h67r7fe341c'
token = 'AQAg4h45h4DJk4545gBDqIln6hNJGet45DHJgVxCjncQ'

metrika = Metrika(client_id, token=token)

Installation

$ pip install yametrikapy

Example usage

from yametrikapy import Metrika


def main():
    client_id = '6993a3cd88e34ac67574578th87h67r7fe341c'
    client_secret = 'AQAg4h45h4DJk4545gBDqIln6hNJGet45DHJgVxCjncQ'
    code = '3463468'

    metrika = Metrika(client_id, client_secret=client_secret, code=code)

    counters = metrika.counters().counters
    print(counters)

    counter_id = counters[0]['id']
    stat = metrika.stat_data(counter_id, 'ym:s:visits,ym:s:users', dimensions='ym:s:searchEngineName')
    print(stat.data)

    counter = metrika.add_counter('My new counter', 'my-site.ru')
    print(counter.counter['id'], counter.counter['name'])

    # Output obtained data
    print(metrika.get_data())


if __name__ == '__main__':
    main()

Lisence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].