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.2.tar.gz
(9.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
yandex_py-0.0.2-py3-none-any.whl
(10.7 kB
view details)
File details
Details for the file yandex_py-0.0.2.tar.gz.
File metadata
- Download URL: yandex_py-0.0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a50047b1a77b46e3be6b1cee64f738332dc49bbd0c500657910dbd1083545107
|
|
| MD5 |
f5b4b519f9a81dbfe968742b8133e63f
|
|
| BLAKE2b-256 |
29971cb4725699739848c36e71dc3693385cd0f4d3b287fb0cdff2a1b5e5a6c6
|
File details
Details for the file yandex_py-0.0.2-py3-none-any.whl.
File metadata
- Download URL: yandex_py-0.0.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fe4852ee1e602e44cd7cde09b2044de7a06c4e6bf5df2a8aa2ce778a2dcfee8
|
|
| MD5 |
4e96aed3afa36c15c1ae5868beb0956c
|
|
| BLAKE2b-256 |
bd5d5be37cd40d0934ab476dd979c72fbca706df7d94b6c75ba084e2e9999892
|