Skip to main content

Supported Python Versions GitHub license Downloads Code style: black

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

Удачи тебе, друг! Поставь звездочку ;)

Metadata

Release files for marilyn-api 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marilyn-api 0.1.1
File Size Uploaded Provenance
marilyn-api-0.1.1.tar.gz 4.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for marilyn-api 0.1.1
File Interpreter ABI Platform
marilyn_api-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / marilyn-api-0.1.1.tar.gz

Download URL marilyn-api-0.1.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c0f21ffc9f5defd8705a5d6cdccf20b9226303338c2fd6a07a516c7f102ce6e4
BLAKE2b-256 checksum
How to use checksums
cd2d09e1b06ccc20935958588390b61e0343df6070af250ae5755242fd44d79e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.7.9 Windows/10

Release files / marilyn_api-0.1.1-py3-none-any.whl

Download URL marilyn_api-0.1.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed80cc1c4a6c77a9f3061272c75714929d34d397781f52f5544239a996872b61
BLAKE2b-256 checksum
How to use checksums
fdbadc9f642576a0e6f5e403624d2422a794d20d2fb20f8bb9e7c8d48643c94a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.7.9 Windows/10

Security for marilyn-api 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page