Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

Try Flet online in Flet Studio

Start your next Flet app in the browser, then use this package locally to prepare its icons and splash screens. Write your own Python code or get help from the AI agent.

Used by flet build, and importable on its own. Pillow handles raster images and resvg_py renders SVG; neither requires a separately installed conversion tool. 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.svg")
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

SVG sources are rendered in memory to fit within 2048 × 2048 pixels, keeping their aspect ratio and transparency. A square viewBox, such as 0 0 24 24, works at every output size; no intermediate PNG is written to your assets. Use self-contained SVGs with vector paths and embedded images. Convert text to paths to keep the result independent of fonts installed on the build host.

load_source(path, svg_size=1024) uses a smaller SVG render canvas. flet build uses this for splashes, matching the on-screen size of a 1024px PNG source.

DEFAULT_ICON is the path to the bundled Flet logo SVG. flet build renders icons and the splash from it, with derived=True, for an app that supplies no icon, so a preview made from it matches what the build produces.

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.

Metadata

Release files for flet-platform-assets 1.1.0.dev2

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-platform-assets 1.1.0.dev2
File Size Uploaded Provenance Actions
flet_platform_assets-1.1.0.dev2.tar.gz 39.3 kB Without provenance Details for flet_platform_assets-1.1.0.dev2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flet-platform-assets 1.1.0.dev2
File Interpreter ABI Platform Actions
flet_platform_assets-1.1.0.dev2-py3-none-any.whl Python 3 none any Details for flet_platform_assets-1.1.0.dev2-py3-none-any.whl

Total release size: 67.3 kB

Release files / flet_platform_assets-1.1.0.dev2.tar.gz

Download URL flet_platform_assets-1.1.0.dev2.tar.gz
Size 39.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9804a7adc0500ae2b76794a2c4d7b1c9f1d318963bcf0ef5a9128695bfb0786f
BLAKE2b-256 checksum
How to use checksums
84955be73f25191c23d680e0a45505508dfbb0bd09a9a7ccfc48904b888685a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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}

Release files / flet_platform_assets-1.1.0.dev2-py3-none-any.whl

Download URL flet_platform_assets-1.1.0.dev2-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ec2ef0b0d47fcf5fb9c31e03548f55d42306e9be2b7c0fad03b6a411549d6e3
BLAKE2b-256 checksum
How to use checksums
d7ec227807ba0369099c289dc214aff16b8e8aabac700152330c5e4445699a5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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}

Security for flet-platform-assets 1.1.0.dev2

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.

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