MCPcopy
hub / github.com/flet-dev/flet

github.com/flet-dev/flet @v0.85.3 sqlite

repository ↗ · DeepWiki ↗ · release v0.85.3 ↗
5,984 symbols 23,770 edges 1,340 files 2,391 documented · 40%
README

Flet logo

<em>Build multi-platform apps in Python. No frontend experience required.</em>







<a href="https://github.com/flet-dev/flet/blob/main/LICENSE" target="_blank">
    <img src="https://img.shields.io/github/license/flet-dev/flet.svg" alt="License" /></a>
<a href="https://pypi.org/project/flet" target="_blank">
    <img src="https://img.shields.io/pypi/v/flet?color=%2334D058&label=pypi" alt="Package version" /></a>
<a href="https://pepy.tech/project/flet" target="_blank">
    <img src="https://static.pepy.tech/badge/flet/month" alt="Monthly downloads" /></a>
<a href="https://pypi.org/project/flet" target="_blank">
    <img src="https://img.shields.io/badge/python-%3E%3D3.10-%2334D058" alt="Python >= 3.10" /></a>
<a href="https://github.com/flet-dev/flet/actions/workflows/ci.yml" target="_blank">
    <img src="https://github.com/flet-dev/flet/actions/workflows/ci.yml/badge.svg" alt="Build status" /></a>
<a href="https://github.com/flet-dev/flet/tree/main/website/static/docs/assets/badges/docs-coverage" target="_blank">
    <img src="https://flet.dev/docs/assets/badges/docs-coverage/flet.svg" alt="Docstring coverage" /></a>

Flet is a framework that allows building mobile, desktop and web applications in Python only without prior experience in frontend development.

   Single code base for any device

Your app will equally look great on iOS, Android, Windows, Linux, macOS and web.

   Build an entire app in Python

Build a cross-platform app without knowledge of Dart, Swift, Kotlin, HTML or JavaScript - only Python!

   150+ built-in controls and services

Beautiful UI widgets with Material and Cupertino design: layout, navigation, dialogs, charts - Flet uses Flutter to render UI.

   50+ Python packages for iOS and Android

Numpy, pandas, pydantic, cryptography, opencv, pillow and other popular libraries.

   Full web support

Flet apps run natively in modern browsers using WebAssembly and Pyodide, with no server required. Prefer server-side? Deploy as a Python web app with real-time UI updates.

   Built-in packaging

Build standalone executables or bundles for iOS, Android, Windows, Linux, macOS and web. Instantly deploy to App Store and Google Play.

   Test on iOS and Android

Test your project on your own mobile device with Flet App. See your app updates as you make changes.

   Extensible

Easily wrap any of thousands of Flutter packages to use with Flet or build new controls in pure Python using built-in UI primitives.

   Accessible

Flet is built with Flutter which has solid accessibility foundations on Android, iOS, web, and desktop.

Flet app example

Below is a simple "Counter" app, with a text field and two buttons to increment and decrement the counter value:

```python title="counter.py" import flet as ft

def main(page: ft.Page): page.title = "Flet counter example" page.vertical_alignment = ft.MainAxisAlignment.CENTER

input = ft.TextField(value="0", text_align=ft.TextAlign.RIGHT, width=100)

def minus_click(e):
    input.value = str(int(input.value) - 1)

def plus_click(e):
    input.value = str(int(input.value) + 1)

page.add(
    ft.Row(
        alignment=ft.MainAxisAlignment.CENTER,
        controls=[
            ft.IconButton(ft.Icons.REMOVE, on_click=minus_click),
            input,
            ft.IconButton(ft.Icons.ADD, on_click=plus_click),
        ],
    )
)

ft.run(main)


To run the app, install `flet`:

```bash
pip install 'flet[all]'

then launch the app:

flet run counter.py

This will open the app in a native OS window - what a nice alternative to Electron! 🙂

<img src="https://flet.dev/docs/assets/getting-started/counter-app/macos.png" width="45%" />

To run the same app as a web app use --web option with flet run command:

flet run --web counter.py
<img src="https://flet.dev/docs/assets/getting-started/counter-app/safari.png" width="60%" />

Learn more

Community

Contributing

Want to help improve Flet? Check out the contribution guide.

Core symbols most depended-on inside this repo

add
called by 606
sdk/python/packages/flet/src/flet/controls/base_page.py
run
called by 592
sdk/python/packages/flet-cli/src/flet_cli/utils/android_sdk.py
append
called by 566
sdk/python/packages/flet/src/flet/components/observable.py
update
called by 312
sdk/python/examples/tutorials/todo/async/main.py
all
called by 309
sdk/python/packages/flet/src/flet/controls/margin.py
_invoke_method
called by 248
sdk/python/packages/flet/src/flet/controls/base_control.py
update
called by 231
sdk/python/packages/flet/src/flet/controls/page.py
get
called by 197
sdk/python/packages/flet/src/flet/controls/query_string.py

Shape

Function 3,187
Method 1,699
Class 1,075
Route 23

Languages

Python99%
TypeScript1%

Modules by API surface

sdk/python/packages/flet/src/flet/controls/object_patch.py74 symbols
sdk/python/packages/flet/src/flet/controls/page.py65 symbols
sdk/python/packages/flet/tests/test_validation.py58 symbols
sdk/python/packages/flet/src/flet/controls/base_page.py51 symbols
sdk/python/packages/flet/src/flet/utils/validation.py50 symbols
sdk/python/packages/flet-map/src/flet_map/types.py47 symbols
sdk/python/packages/flet/tests/test_object_diff_frozen.py46 symbols
sdk/python/packages/flet/src/flet/controls/types.py45 symbols
sdk/python/packages/flet/src/flet/controls/theme.py44 symbols
sdk/python/packages/flet-cli/tests/test_project_dependencies.py43 symbols
sdk/python/packages/flet/src/flet/components/observable.py40 symbols
sdk/python/examples/apps/palette_editor/main.py39 symbols

Dependencies from manifests, versioned

@docsearch/docusaurus-adapter4.6.2 · 1×
@docusaurus/core3.10.0 · 1×
@docusaurus/faster3.10.0 · 1×
@docusaurus/plugin-client-redirects3.10.0 · 1×
@docusaurus/preset-classic3.10.0 · 1×
@docusaurus/theme-mermaid3.10.0 · 1×
@hcaptcha/react-hcaptcha1.0.0 · 1×
@mdx-js/react3.0.0 · 1×
clsx1.1.1 · 1×
docusaurus-theme-github-codeblock2.0.2 · 1×
prism-react-renderer2.1.0 · 1×
react18.2.0 · 1×

For agents

$ claude mcp add flet \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact