Code Monkey home page Code Monkey logo

mustamusti / flet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flet-dev/flet

0.0 0.0 0.0 30.3 MB

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.

Home Page: https://flet.dev

License: Apache License 2.0

Shell 0.03% JavaScript 0.10% Ruby 0.39% C++ 0.99% Python 51.47% C 0.06% Objective-C 0.01% Go 4.67% PowerShell 0.04% Kotlin 0.01% Dart 41.23% Swift 0.11% HTML 0.13% CMake 0.74% Batchfile 0.02% Dockerfile 0.01%

flet's Introduction

Flet

Build status

Flet is a framework that enables you to easily build realtime web, mobile, and desktop apps in your favorite language and securely share them with your team. No frontend experience required.

⚡From idea to app in minutes

An internal tool or a dashboard for your team, weekend project, data entry form, kiosk app, or high-fidelity prototype - Flet is an ideal framework to quickly hack great-looking interactive apps to serve a group of users.

📐 Simple architecture

No more complex architecture with JavaScript frontend, REST API backend, database, cache, etc. With Flet you just write a monolith stateful app in Python only and get multi-user, realtime Single-Page Application (SPA).

🔋Batteries included

To start developing with Flet, you just need your favorite IDE or text editor. No SDKs, no thousands of dependencies, no complex tooling - Flet has built-in web server with assets hosting and desktop clients.

   Powered by Flutter

Flet UI is built with Flutter, so your app looks professional and could be delivered to any platform. Flet simplifies Flutter model by combining smaller "widgets" to ready-to-use "controls" with an imperative programming model.

🌐 Speaks your language

Flet is language-agnostic, so anyone on your team could develop Flet apps in their favorite language. Python is already supported, Go, C# and others are coming next.

📱 Deliver to any device

Deploy Flet app as a web app and view it in a browser. Package it as a standalone desktop app for Windows, macOS, and Linux. Install it on mobile as PWA or view via Flet app for iOS and Android.

Flet app example

At the moment you can write Flet apps in Python and other languages will be added soon.

Here is a sample "Counter" app:

import flet
from flet import IconButton, Page, Row, TextField, icons

def main(page: Page):
    page.title = "Flet counter example"
    page.vertical_alignment = "center"

    txt_number = TextField(value="0", text_align="right", width=100)

    def minus_click(e):
        txt_number.value = int(txt_number.value) - 1
        page.update()

    def plus_click(e):
        txt_number.value = int(txt_number.value) + 1
        page.update()

    page.add(
        Row(
            [
                IconButton(icons.REMOVE, on_click=minus_click),
                txt_number,
                IconButton(icons.ADD, on_click=plus_click),
            ],
            alignment="center",
        )
    )

flet.app(target=main)

To run the app install flet module:

pip install flet

and run the program:

python counter.py

The app will be started in a native OS window - what a nice alternative to Electron!

Now, if you want to run the app as a web app, just replace the last line with:

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

run again and now you instantly get a web app:

Getting started

Sample apps in Python

Community

Contribute to this wonderful project

flet's People

Contributors

abdulmumin1 avatar am1010101 avatar apumapho avatar calvinweb avatar ewen-zippedscript avatar feodorfitsner avatar inesafitsner avatar iron3oxide avatar jantosi avatar kulothunganug avatar marksmayo avatar mikaelho avatar mmartin09 avatar modaye avatar ndonkohenri avatar ndvanforeest avatar owenmcdonnell avatar pouralijan avatar ri-2020 avatar roniemartinez avatar shenanigansd avatar skeledrew avatar stanmathers avatar techemmy avatar thearyadev avatar trafire avatar yogeshwaran01 avatar youjiacheng avatar zerocool940711 avatar zrr1999 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.