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.
pip install fletVerified import paths — ran on the pinned version, not inferred.
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.
Replace `event.delta_x` with `event.local_delta.x` and `event.delta_y` with `event.local_delta.y`.
Always use `pip install flet` and `import flet as ft`.
Use `ft.app(target=main, view=ft.WEB_BROWSER)` for web browser mode. For deployment, consider `flet run` or `flet publish` CLI commands.
To add multiple controls, wrap them in a layout control such as `ft.Row`, `ft.Column`, or `ft.Stack`, and then add that single layout control to the page: `page.add(ft.Column([control1, control2]))`.
Install with `pip install flet` and import with `import flet as ft`.
Wrap multiple controls in a layout container (e.g., `ft.Row`, `ft.Column`) and pass the container as a single argument to `page.add()`. Example: `page.add(ft.Column([control1, control2]))`.
Ensure your Flet Python script is actively running. If the port is an issue, try running `ft.app(target=main, port=8551)` to use a different port, or check firewall settings.
Add `import flet as ft` at the top of your Flet application script.
No dependency data recorded yet.