Flet is a Python framework that enables developers to build interactive, real-time, multi-platform applications using a simple Python API. It renders UI using Flutter, allowing apps to run as web apps, desktop executables, or mobile apps from the same codebase. The current version is 0.84.0, and it maintains an active and frequent release cadence, often with bi-weekly updates.
Install & Compatibility
Where this runs
tested against v0.85.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 2.249s · 29.1MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.7s · import 2.015s · 30MB
28MB installed
● package 28MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
The primary package is 'flet', not 'flet_web'.
import flet as ft
Type hint for the Page object passed to the main function.
page: ft.Page
This quickstart demonstrates a simple counter application. It initializes a Flet page, creates a text field and two buttons, and defines event handlers to increment or decrement the counter. The `ft.app(target=main)` call runs the application, typically opening a desktop window by default.
import flet as ft
def main(page: ft.Page):
page.title = "Flet Counter"
page.vertical_alignment = ft.MainAxisAlignment.CENTER
txt_number = ft.TextField(value="0", text_align=ft.TextAlign.RIGHT, width=100)
def minus_click(e):
txt_number.value = str(int(txt_number.value) - 1)
page.update()
def plus_click(e):
txt_number.value = str(int(txt_number.value) + 1)
page.update()
page.add(
ft.Row(
[
ft.IconButton(ft.icons.REMOVE, on_click=minus_click),
txt_number,
ft.IconButton(ft.icons.ADD, on_click=plus_click),
],
alignment=ft.MainAxisAlignment.CENTER,
)
)
ft.app(target=main)
flet --version
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.