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.1.tar.gz (9.1 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.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yandex_py-0.0.1.tar.gz
  • Upload date:
  • Size: 9.1 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.1.tar.gz
Algorithm Hash digest
SHA256 8c7bd3c5c4831e6d617c31d7fcdfd1c2fd40bdf244ddfec443c8ea89f434e8e5
MD5 4ed4d6bc1d5f600f6194185540de509a
BLAKE2b-256 42d1c0a58c458731a83ef633fdf3338de8c256582a3a3e79ebdf1dc4418ff6a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yandex_py-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6f22983653ad57e3893507c182a4f80a94a769a9cab787be1d3dc3d2104ced0e
MD5 6c2d3b727102b8a069151abad9f78d01
BLAKE2b-256 6a206c9197225371d0c01310f8afbcb0af2f12439976fd800eb59551cea2e328

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