Skip to main content

Flet platform assets

python docstring coverage

Turns one source image into every app icon and splash screen a platform expects — iOS and macOS asset catalogs, Android mipmaps and adaptive layers, a multi-size Windows .ico, the Linux hicolor tree, and web favicons, maskable icons and splash images.

Used by flet build, and importable on its own. Pillow is the only dependency; nothing here imports flet or flet-cli.

Rendering is separate from writing

render_*() is pure: it takes images and returns images, never touching the filesystem and never printing. That makes it usable behind a UI that previews icons before anything is built.

from flet_platform_assets import IconOptions, load_source, render_icons, write

source, _ = load_source("assets/icon.png")
result = render_icons(source, IconOptions())

for asset in result.assets:          # preview
    print(asset.relative_path, asset.image.size, asset.image.mode)
for warning in result.warnings:      # diagnostics are data, not log output
    print(warning)

write(result, "build/flutter")       # the only step that touches disk

What it will not do

It never re-frames your artwork. The padding inside your icon is a design decision, so only transforms the platform actually requires are applied — flattening where alpha is rejected, the macOS icon grid, multi-size .ico, opaque maskable icons.

The one exception is the Android 12 splash icon, whose canvas is a platform frame with a guaranteed-cropped outer third; there the artwork is fitted to the visible circle rather than silently clipped.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flet_platform_assets-0.1.0.tar.gz (35.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flet_platform_assets-0.1.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file flet_platform_assets-0.1.0.tar.gz.

File metadata

  • Download URL: flet_platform_assets-0.1.0.tar.gz
  • Upload date:
  • Size: 35.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for flet_platform_assets-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cbe28807670f01689d27c21bb223bdd593a1738839f80ebc8dbc77c3347d2bdd
MD5 c23719e1d9797a524d0d96fa528e65c2
BLAKE2b-256 3797eb9e9494dd2a53d1ac511599fea70c4ee6b9bfb34df0fef9c60c4c7fbe5e

See more details on using hashes here.

File details

Details for the file flet_platform_assets-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flet_platform_assets-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for flet_platform_assets-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d991636137f183ccc47c0d7f9634cc8f004db0c8a6c1c59dc535bbc07d3e273e
MD5 01346edac0c06498fc8b9d99e7abfa78
BLAKE2b-256 2436be6852339c6069fefdbdbd2ae3e0232253ced2c187dda1a7524c26c16526

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

This release

0.1.0 This release

2 files

0.0.0

2 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