Flet for Python - easily build interactive multi-platform apps in Python
Project description
Flet - quickly build interactive apps for web, desktop and mobile in Python
Flet is a rich User Interface (UI) framework to quickly build interactive web, desktop and mobile apps in Python without prior knowledge of web technologies like HTTP, HTML, CSS or JavaScript. You build UI with controls based on Flutter widgets to ensure your programs look cool and professional.
Requirements
- Python 3.7 or above on Windows, Linux or macOS
Installation
pip install flet
Create the app
Create main.py
file with the following content:
import flet as ft
def main(page: ft.Page):
page.title = "Flet counter example"
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(main)
Run as a desktop app
The following command will start the app in a native OS window:
flet run main.py
Run as a web app
The following command will start the app as a web app:
flet run --web main.py
Learn more
Visit Flet website.
Continue with Python guide to learn how to make a real app.
Browse for more Flet examples.
Join to a conversation on Flet Discord server.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for flet-0.24.0.dev3270-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6fe6c854d40bab653dfbbbdd8140873ea44cefef6d22c7e480f31575a57f254 |
|
MD5 | 36ed91ab46c4900541420011c3b8f463 |
|
BLAKE2b-256 | 6cdb0348f3f48c8639a27fce437848ccabfbea8c730252574ba5b7c72c9c71bd |
Hashes for flet-0.24.0.dev3270-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c24702c1f39509bbb60a55253f7af5bf148a63692985e3791c342569cb08dc2 |
|
MD5 | 54fb87e0ba874c13b49cf7c6372384f4 |
|
BLAKE2b-256 | d36959e86b633353447298459baf048d70dd3bde81948baf5a05c7d5019ecafe |
Hashes for flet-0.24.0.dev3270-py3-none-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56c646d173924cf5b4f3492f9461124f190b8f2fa5ed42cbc54722cf3b14e74b |
|
MD5 | df2045f33fd61a69f664dfe5edd88afb |
|
BLAKE2b-256 | 40b10e174fdcd0ec59b9548c4d13fc14e330bbce0a0fc17aae7e7a78ef088f9d |
Hashes for flet-0.24.0.dev3270-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 792abde6feba7c540011a07643b59ec0da34b99ca7a87e3046c12041811a2508 |
|
MD5 | 58e79983c9f2315301b4c3e481ccf390 |
|
BLAKE2b-256 | 398abd87538699e7615de7bc5b6bb22dc322f0caee5bf52a43ec0afb6efa1ceb |
Hashes for flet-0.24.0.dev3270-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3bda53b1c5bcef4ca217cebcbf6bca1ccccd187fc4c5333f6308ddd30733705 |
|
MD5 | 3a9ab4a6cfddc9a3abc22a58000684b4 |
|
BLAKE2b-256 | 7264df50f5e294293e28f6a77f0436be4fe6a05d88e327d2e0f7d3465bd4fe8d |
Hashes for flet-0.24.0.dev3270-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 476fba2d8b43377db115693d9c01dd210a4592238e414535e7ea6696cbc80c57 |
|
MD5 | 96d89307e2cfc582cfd4c6affcd041bc |
|
BLAKE2b-256 | 4d0fbef0887808b3c6d9f4f5975fa6b83bd5f2b5ef14c17762572f489b9e63fd |
Hashes for flet-0.24.0.dev3270-py3-none-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de67af2b6741ce1e2206f1a286c892142b02585ca59bd1db8ed37d02ff0652b8 |
|
MD5 | be740aeacb1eb0541359009d663b6cfe |
|
BLAKE2b-256 | 3aac81fcd48f6140c776923160c1a034fccae8efc1f81ae74996f78dc85ff70d |
Hashes for flet-0.24.0.dev3270-py3-none-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcce9d497ec2086fa772131bd0f12ed00ca7a1aa33c664b0caf1ddef93ff4fb6 |
|
MD5 | 9cb50ad837b9befdbd2ff91500f6a49b |
|
BLAKE2b-256 | 7b39d6e4a820a871ad86bebd537022d05f5ee2c748670bc57fcf1bd9d3ff5f02 |
Hashes for flet-0.24.0.dev3270-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e0731d89b84650e26e5ca94087d624a9f31ceefb791a4326e53986f7d714fcc |
|
MD5 | e1b934c0a6ff38859405f9c4e46241cd |
|
BLAKE2b-256 | 838c9f6f62ed41e7810cb81dc88bc989409f1a423c832a99e7e6dd9c1bcf20b0 |