Skip to main content

flet-yandex-ads

pypi python license

Display Yandex Mobile Ads in Flet apps.

A 1:1 wrapping of the official yandex_mobileads Flutter plugin, in the same architecture as flet-ads. Yandex is a large demand source on its own, and it can mediate AdMob, AppLovin, Mintegral, Pangle, Unity and more behind one integration.

Test it without an account

Every release builds an unsigned test APK of the example app with Yandex demo ad units — no signup needed:

Android Architecture Build Splits

Variant Download Notes
📱 ARM64 (most phones/TVs) yandexadsexample-arm64-v8a.apk Modern 64-bit Android devices — grab this one unless you know otherwise
📱 ARMv7 (older phones/TV boxes) yandexadsexample-armeabi-v7a.apk Legacy 32-bit Android devices
💻 x86_64 (emulators/ChromeOS) yandexadsexample-x86_64.apk Android emulators & Chromebooks

Platform Support

Platform Windows macOS Linux iOS Android Android TV Web
Supported ❌ ❌ ❌ ✅ ✅ ⚠️ ❌

⚠️ Android TV runs and attempts to serve ads (the SDK is an Android SDK), but fill rate and remote-control focus are untested — try the APK above on a TV and see.

Usage

uv add flet-yandex-ads
import flet as ft
import flet_yandex_ads as fya

def main(page: ft.Page):
    page.services.append(fya.YandexAdsService(user_consent=True))
    page.add(fya.BannerAd(unit_id="demo-banner-yandex"))

ft.run(main)

The demo ad units (demo-banner-yandex, demo-interstitial-yandex, demo-rewarded-yandex, demo-appopenad-yandex) work out of the box. Replace them with your own ad block IDs (R-M-XXXXXX-Y) from the partner interface for production.

Controls

Control Base Purpose
YandexAdsService ft.Service SDK init + privacy flags (consent applied before init, as the SDK requires)
BannerAd ft.LayoutControl Sticky or inline banner, loads automatically, reload()
InterstitialAd ft.Service Full-screen, one-shot per instance
RewardedAd ft.Service Full-screen; wait_for_dismiss() returns the reward
AppOpenAd ft.Service Full-screen, one-shot per instance

Full-screen ads load when the service is added to the page. Each is one-shot — create a new instance per ad and call destroy() afterwards.

Event handlers

BannerAd(
    unit_id="R-M-XXXXXX-Y",
    on_load=lambda e: print(f"{e.width}x{e.height}"),       # typed
    on_load_failed=lambda e: print(e.code, e.description),  # typed
    on_click=lambda e: print("clicked"),                    # plain
)

Typed handlers must use ft.EventHandler[SomeEvent], not ft.ControlEventHandler[SomeEvent] — ControlEventHandler[X] double-wraps X in Event[...], so Flet builds a plain Event and e.width raises AttributeError. (flet-ads 1.0.4 has this bug in its on_paid.)

Typed events: BannerLoadedEvent (width, height), AdRequestErrorEvent (code, description, ad_unit_id), AdErrorEvent (description), ImpressionEvent (impression_data — ILRD), RewardEvent (amount, type).

Configuration

No manifest keys or Info.plist entries are needed for basic operation. Mediation adapters are added to the generated Flutter app's Gradle config — see the plugin docs.

Limitations

  • The Flutter plugin exposes four formats: banner, interstitial, rewarded, app open. Native and InStream ads exist only in Yandex's native SDKs.
  • Ads don't render on desktop or web (by design — same as every mobile ad SDK).

Example

A complete app (sticky + inline banner, interstitial, rewarded, app open, with an activity-terminal log view) is in examples/flet_yandex_ads_example/.

License

MIT

Metadata

Release files for flet-yandex-ads 0.1.0

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

Source distribution (sdist)

Source distribution for flet-yandex-ads 0.1.0
File Size Uploaded
flet_yandex_ads-0.1.0.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flet-yandex-ads 0.1.0
File Interpreter ABI Platform
flet_yandex_ads-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.9 kB

Release files / flet_yandex_ads-0.1.0.tar.gz

Download URL flet_yandex_ads-0.1.0.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c5625d0662dfa937953b6e4f4abd0080fff8fdcca22a2bdcd76af946e48eeb85
BLAKE2b-256 checksum
How to use checksums
c8b4e79766880232348249daad9bff666d727423d3a94814245424a221c2d0d4
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 Oct 9, 2026.

Transparency log

Release files / flet_yandex_ads-0.1.0-py3-none-any.whl

Download URL flet_yandex_ads-0.1.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1c9c79ad382cc351aee9d5b75f9289b6966314eeb27e3768aab657b2ebdc4ac
BLAKE2b-256 checksum
How to use checksums
42ab93ea3f5277fd2548f0c62112d052d5874d1c712b1954775eaa0a1add634c
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 Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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