Async client for Marilyn API
Project description
Async client for Marilyn API
Installation
pip install marilyn-api
Examples
from marilyn_api import AsyncClient
api_root = "https://app.mymarilyn.ru"
headers = {
"X-API-Account": 100500,
"X-API-Token": "{auth token}",
}
aclient = AsyncClient(api_root, headers=headers)
body = {
"channel_id": [],
"start_date": "2022-02-01",
"end_date": "2022-02-18",
"date_grouping": "day",
"grouping": "placement",
"filtering": [
{
"entity": "no",
"entities": []
},
{
"entity": "project",
"entities": [
4551
]
}
],
"custom_metrics": [],
"profiles": [],
"goals": [],
"with_vat": False,
"per_page": 200,
"sorting": "date",
"columns": [
"date",
"placement_id",
"placement_name",
"campaign_xid",
"channel_id",
"impressions",
"clicks",
"cpm_fact",
"reach_total_sum",
"viral_reach_total_sum",
"ctr",
"cost_fact",
"cpc_fact",
"orders",
"model_orders",
"revenue",
"revenue_model_orders"
]
}
async for page in aclient.iter_statistics_detailed(body):
for item in page["items"]:
print("RECORD:", item)
Script examples
python Examples/statistics_detailed.py --help
python Examples/statistics_detailed.py -r https://app.mymarilyn.ru -a 100500 -t MytoKeN12345 -c Examples/detailed-stats-config.json
python Examples/project_placements.py.py --help
python Examples/project_placements.py.py -r https://app.mymarilyn.ru -a 100500 -p 12345 -t MytoKeN12345
Dependencies
- aiohttp
Author
Pavel Maksimov
You can contact me at Telegram
Удачи тебе, друг! Поставь звездочку ;)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
marilyn-api-0.1.1.tar.gz
(4.6 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
File details
Details for the file marilyn-api-0.1.1.tar.gz.
File metadata
- Download URL: marilyn-api-0.1.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.7.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0f21ffc9f5defd8705a5d6cdccf20b9226303338c2fd6a07a516c7f102ce6e4
|
|
| MD5 |
cf82b30794c0c269bfc1c04cf6a39cbe
|
|
| BLAKE2b-256 |
cd2d09e1b06ccc20935958588390b61e0343df6070af250ae5755242fd44d79e
|
File details
Details for the file marilyn_api-0.1.1-py3-none-any.whl.
File metadata
- Download URL: marilyn_api-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.7.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed80cc1c4a6c77a9f3061272c75714929d34d397781f52f5544239a996872b61
|
|
| MD5 |
c7b5229274b099126972246842f7bae5
|
|
| BLAKE2b-256 |
fdbadc9f642576a0e6f5e403624d2422a794d20d2fb20f8bb9e7c8d48643c94a
|