Skip to main content

Yandex API wrapper for Python built on top of httpx and pydantic

Project description

yandex_py

Python-клиент для Yandex Direct API на базе httpx и pydantic.

Установка

pip install yandex_py

Использование

from yandex_py import HTTPRequestSender, YDirectReport
from yandex_py.reports.schemas import (
    DateRangeType, FieldName, Page,
    ReportDefinition, ReportRequest, ReportType, SelectionCriteria,
)

sender = HTTPRequestSender(token="your_token", client_login="your_login")

request = ReportRequest(
    params=ReportDefinition(
        selection_criteria=SelectionCriteria(),
        field_names=[FieldName.Date, FieldName.Clicks, FieldName.Cost],
        report_name="my-report",
        report_type=ReportType.CUSTOM_REPORT,
        date_range_type=DateRangeType.LAST_7_DAYS,
        page=Page(limit=10000),
    )
)

async with sender:
    report = YDirectReport(request=request, sender=sender)
    rows = await report.fetch()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yandex_py-0.0.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yandex_py-0.0.3-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file yandex_py-0.0.3.tar.gz.

File metadata

  • Download URL: yandex_py-0.0.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.1 {"installer":{"name":"uv","version":"0.10.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yandex_py-0.0.3.tar.gz
Algorithm Hash digest
SHA256 96ab2b8627aea9611b596c652f96ffe7c571c7dcd686a8299213ade3d768f6dc
MD5 7ddfc168c8f58bfad1ceaf2007a57c3f
BLAKE2b-256 c0839d631b80587e8542bc7ac9ec35ecb9e35d1c81981ea62ff4099ec361f241

See more details on using hashes here.

File details

Details for the file yandex_py-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: yandex_py-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.1 {"installer":{"name":"uv","version":"0.10.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yandex_py-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 db15bbc99e76220933d0a493b193e3ba3293bcf130748f03690543f69ccb930e
MD5 b07e39ecaf10b97af9fd8d6ee5328731
BLAKE2b-256 f48c31b11990deb174b0c9d37c9362d90d8f6f78af066bdfd148f14b67e9f639

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page