Yandex API wrapper for Python built on top of httpx and pydantic
Project description
yandex_py
Python-клиент для Yandex API на базе httpx и pydantic.
Сейчас библиотека организована по продуктам. Текущая реализация покрывает yandex_py.direct.
Установка
pip install yandex_py
Использование
from yandex_py.direct import DirectClient
from yandex_py.direct.reports.types import (
DateRangeType, FieldName, Page,
ReportDefinition, ReportRequest, ReportType, SelectionCriteria,
)
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 DirectClient(token="your_token", client_login="your_login") as client:
rows = await client.reports.fetch(request)
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.5.tar.gz
(16.5 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.5-py3-none-any.whl
(19.1 kB
view details)
File details
Details for the file yandex_py-0.0.5.tar.gz.
File metadata
- Download URL: yandex_py-0.0.5.tar.gz
- Upload date:
- Size: 16.5 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 |
f4bac40201a74b48d2f64d5ee6f174660d3828905913d97fcdb783894711f6f4
|
|
| MD5 |
bd7240a66c7a30f2a6523b5799d1a98f
|
|
| BLAKE2b-256 |
578bfcc87ea31d8ead18e8230810dbf6171ff5e68202b35a6d6526615b5ce7db
|
File details
Details for the file yandex_py-0.0.5-py3-none-any.whl.
File metadata
- Download URL: yandex_py-0.0.5-py3-none-any.whl
- Upload date:
- Size: 19.1 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 |
dcc09f66a4b792f2c97a0bba2c67a880b0c646def240da6eaf771b86e281d550
|
|
| MD5 |
9262958f98d53e53288260ad0f303e3f
|
|
| BLAKE2b-256 |
e8a966a4cbe6990af75498e2cd21991fcecf79124f06c6e2a48f751be1e557a4
|