Apache Airflow provider for Avito CPA — collect call statistics
Project description
airflow-provider-avito
Apache Airflow provider for Avito CPA — collect call statistics from the Avito advertising platform.
Powered by Claude Code
Installation
pip install airflow-provider-avito
Requires Python 3.10+ and apache-airflow>=2.9.1.
Connection
Create an Airflow connection of type HTTP with conn_id = avito_default (or any name you pass to the operator).
Only the Extra field is used. login and password are ignored.
Single account
{
"client_id": "your_client_id",
"client_secret": "your_client_secret"
}
Multiple accounts
{
"accounts": [
{"id": "main", "client_id": "id1", "client_secret": "secret1"},
{"id": "agency", "client_id": "id2", "client_secret": "secret2"}
]
}
Use account_id parameter on the operator to select which account to use.
Quick start
from airflow.decorators import dag
from airflow.models.param import Param
from airflow_provider_avito.operators.calls import AvitoCallsOperator
@dag(schedule=None, params={"date_from": Param("2026-06-01"), "date_to": Param("2026-06-07")})
def avito_calls_example():
AvitoCallsOperator(
task_id="collect_calls",
avito_conn_id="avito_default",
date_from="{{ params.date_from }}",
date_to="{{ params.date_to }}",
base_dir="/tmp/avito",
output_format="json", # or "csv"
)
avito_calls_example()
The operator writes one JSONL (or CSV) file per date to {base_dir}/{safe_run_id}/{date}.json and returns a list[dict] with {"date": "YYYY-MM-DD", "path": "..."} entries.
Output record schema
Each record contains 17 fields:
| Field | Type | Description |
|---|---|---|
id |
int | Call ID |
buyer_phone |
str | Buyer phone |
seller_phone |
str | Seller phone |
virtual_phone |
str | Virtual (masked) phone |
create_time |
str | Creation time (RFC3339) |
start_time |
str | Call start time (RFC3339) |
date |
str | Date (YYYY-MM-DD) derived from start_time |
duration |
int | Call duration, seconds |
waiting_duration |
float | Wait time before answer, seconds |
price |
int | Price in kopecks |
price_rub |
float | Price in rubles (price / 100) |
status_id |
int | Status code |
status |
str | Status label (e.g. "Целевой") |
item_id |
int | Ad ID |
group_title |
str | Campaign name |
is_arbitrage_available |
bool | Whether arbitrage is available |
record_url |
str | Call recording URL |
Examples
Full production examples with BigQuery + S3 upload are in examples/:
bq_and_s3_multi_account_dag.py— multiple accounts in parallel
License
MIT
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
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
File details
Details for the file airflow_provider_avito-0.1.1.tar.gz.
File metadata
- Download URL: airflow_provider_avito-0.1.1.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12f1db18bc4f521ade3d9409832e79430c857ef97b4e9e9d672c2f7dd5f20b1e
|
|
| MD5 |
b0fd7ab26f73a9d0d1c1819b5971402b
|
|
| BLAKE2b-256 |
671f7133f550522e3c766801c98fdc3fcdb988f6f17e00a32e27f208fb10952d
|
Provenance
The following attestation bundles were made for airflow_provider_avito-0.1.1.tar.gz:
Publisher:
publish.yml on mkozhin/airflow-provider-avito
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airflow_provider_avito-0.1.1.tar.gz -
Subject digest:
12f1db18bc4f521ade3d9409832e79430c857ef97b4e9e9d672c2f7dd5f20b1e - Sigstore transparency entry: 1790524948
- Sigstore integration time:
-
Permalink:
mkozhin/airflow-provider-avito@64d289010d37165311972b7186e6ccbbf6b157d3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mkozhin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@64d289010d37165311972b7186e6ccbbf6b157d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file airflow_provider_avito-0.1.1-py3-none-any.whl.
File metadata
- Download URL: airflow_provider_avito-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32f3a144a2caef46b8ce1e5a2fd1c3720bdf86920e892ed40f898ad044c5fe61
|
|
| MD5 |
a6c0d605d2aefc330004859a5b851b47
|
|
| BLAKE2b-256 |
ed3bb9aeeb18c939656b3b87b484943fe7657701f77ba29fa804ed344cf5fe44
|
Provenance
The following attestation bundles were made for airflow_provider_avito-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on mkozhin/airflow-provider-avito
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airflow_provider_avito-0.1.1-py3-none-any.whl -
Subject digest:
32f3a144a2caef46b8ce1e5a2fd1c3720bdf86920e892ed40f898ad044c5fe61 - Sigstore transparency entry: 1790524983
- Sigstore integration time:
-
Permalink:
mkozhin/airflow-provider-avito@64d289010d37165311972b7186e6ccbbf6b157d3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mkozhin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@64d289010d37165311972b7186e6ccbbf6b157d3 -
Trigger Event:
push
-
Statement type: