airflow-provider-yandex-realty
Apache Airflow provider for the Yandex Realty Partner API — collect call statistics from Яндекс Недвижимость.
Powered by Claude Code
Installation
pip install airflow-provider-yandex-realty
Requires Python 3.10+ and apache-airflow>=2.9.1.
Connection
Create an Airflow connection of type HTTP (conn_id = yandex_realty_default by default).
- Password — the OAuth token, stored without the
OAuthprefix (the code adds it when building theAuthorization: OAuth {token}header). - Extra — partner key, agency id, and account(s).
Multiple accounts
{
"x_authorization": "Vertis public-partner-...",
"agency_id": "417938",
"accounts": [
{"client_id": "103575674"},
{"client_id": "67890"}
]
}
Single account
{
"x_authorization": "Vertis public-partner-...",
"agency_id": "417938",
"client_id": "103575674"
}
Which account a task processes is decided by the operator's account_id
parameter — it is a selector into the connection, not a credential:
- single-account — omit
account_id(leave itNone); theclient_idis read from the connection's top-levelclient_id. - multi-account — you do not hardcode it. The DAG enumerates accounts
from the connection with
list_accounts()and passes eachaccount_idautomatically (it equals the sanitizedclient_id).
Usage
YandexRealtyCallsOperator collects calls for a date range, groups them by day,
and writes one file per day. One task processes one account.
Single account
Point the operator at the connection — nothing else is needed; the account is
read from the connection's top-level client_id.
from airflow_provider_yandex_realty.operators.calls import YandexRealtyCallsOperator
collect = YandexRealtyCallsOperator(
task_id="collect_calls",
conn_id="yandex_realty_default",
date_from="{{ ds }}",
date_to="{{ ds }}",
base_dir="/tmp/yandex_realty",
output_format="json", # "json" (NDJSON) or "csv"
add_snapshot_ts=True, # inject the DAG-run start timestamp (JSON only)
)
Multiple accounts
Don't hardcode account_id. Read the accounts from the connection with
list_accounts() and fan out one task per account — account_id comes from the
connection, not by hand:
from airflow_provider_yandex_realty.accounts import list_accounts
from airflow_provider_yandex_realty.operators.calls import YandexRealtyCallsOperator
for account in list_accounts("yandex_realty_default"):
YandexRealtyCallsOperator(
task_id=f"collect_{account.id}",
conn_id="yandex_realty_default",
account_id=account.id, # selector into extra.accounts, taken from the connection
date_from="{{ ds }}",
date_to="{{ ds }}",
)
date_from, date_to and conn_id are templated. execute returns a list of
{date, path, snapshot_ts} entries (one per day written).
For a full multi-account example (collect → GCS → BigQuery + S3), see
examples/bq_and_s3_multi_account_dag.py.
Output
- Layout —
{base_dir}/{account_id}/{safe_run_id}/{date}.{ext}. Theaccount_idsegment is omitted whenaccount_idisNone(single-account). Each path component is sanitized ([^\w-]→_) so untrusted values cannot escapebase_dir.extisjsonorcsv. - JSON — newline-delimited JSON (NDJSON): one JSON object per line.
- CSV — a header row plus one row per call, all fields quoted.
- Columns — the 15 canonical
CALL_FIELDS:call_datetime,date,account_id,object_name,incoming_phone,internal_phone,wait_duration,call_duration,revenue,object_type,campaign_tariff,client_tariff,complaint_status,complaint_refund_amount,is_targeted. - Complaint columns —
complaint_status(accepted/rejected/in_review) andcomplaint_refund_amount(refund in rubles; the API sends it foracceptedcomplaints) come from the API's optionalcomplaintobject and are passed through as returned. Whencomplaintis absent or is not an object, both arenullin JSON and empty in CSV. snapshot_ts— added to each record only whenadd_snapshot_ts=True, and only in JSON output; the CSV schema never gains asnapshot_tscolumn.
License
MIT
Metadata
Release files for airflow-provider-yandex-realty 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| airflow_provider_yandex_realty-0.3.0.tar.gz | 54.9 kB | With provenance | Details for airflow_provider_yandex_realty-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| airflow_provider_yandex_realty-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for airflow_provider_yandex_realty-0.3.0-py3-none-any.whl |
Total release size: 69.2 kB
Release files / airflow_provider_yandex_realty-0.3.0.tar.gz
| Download URL | airflow_provider_yandex_realty-0.3.0.tar.gz |
|---|---|
| Size | 54.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e03018921d4c13a57c10f6d309ae345b92863ac4ed102d74de7d0b2b9bcc620a
|
|
BLAKE2b-256 checksum How to use checksums |
95660adba9ba8e02ee90a7d0f3e6f6864599f9540e7054c59dc354008f9ac091
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logRelease files / airflow_provider_yandex_realty-0.3.0-py3-none-any.whl
| Download URL | airflow_provider_yandex_realty-0.3.0-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db9cdb2f5bd82081c6c3e4013caca3a224936aba163e8bfd1de862617f3c232b
|
|
BLAKE2b-256 checksum How to use checksums |
a1cf6edb20b3ed5084cf7a6466cae65c7292cbbe5d3583438605dccbefa40b7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logSecurity for airflow-provider-yandex-realty 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for airflow_provider_yandex_realty-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.