flet.dev - Build mobile, desktop, and web apps in Python

flet.dev allows you to create flutter apps using Python.

This means you'll be to create desktop, mobile, web apps all with one codebase and it's all regular python!

Installing flet

pip install flet

Basic App structure

import flet
from flet import Page

def main(page: Page):
    # add/update controls on Page
    pass

flet.app(target=main)


Controls

Controls is what flet calls components (aka widgets) that go into your website.

We will add controls to our page object to create our UI.

import flet
from flet import Page, Text

def main(page: Page):
	page.add(Text(value="Hello, world!", color="green"))
    

flet.app(target=main)

Desktop App

Easiest desktop app I ever created for macOS!

Not only can we run create desktop, we can also change it to run on our browser

import flet
from flet import Page, Text

def main(page: Page):
	page.add(Text(value="Hello, world!", color="green"))
    

flet.app(target=main, view=flet.WEB_BROWSER

 Web App

Resources

The fastest way to build Flutter apps in Python | Flet
Build internal web apps quickly in the language you already know.