Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

YMAPILoader

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

YMAPILoader

Yandex Metrica API data loader

  • 0.1.5
  • PyPI
  • Socket score

Maintainers
1

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc