Thanks to visit codestin.com
Credit goes to github.com

Skip to content

flet #1535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chrisrodrigue opened this issue Apr 8, 2025 · 13 comments
Closed

flet #1535

chrisrodrigue opened this issue Apr 8, 2025 · 13 comments

Comments

@chrisrodrigue
Copy link

Any chances of adding flet to WinPython?

https://flet.dev/
https://github.com/flet-dev/flet

@imranhossain001
Copy link

Flet is just a standalone python library which can be get by just pip install flet[all] command. That's all you have to do...
Flet has no dependencies, instead you can test and develop UI using --web then build the needed apk/ipa later in a dedicated system.
So, there's no need to add a python library out of box.

@chrisrodrigue
Copy link
Author

chrisrodrigue commented Apr 9, 2025

Flet is just a standalone python library which can be get by just pip install flet[all] command. That's all you have to do... Flet has no dependencies, instead you can test and develop UI using --web then build the needed apk/ipa later in a dedicated system. So, there's no need to add a python library out of box.

Flet has several dependencies and all but two of them are included in WinPython.

I propose adding a modern UI library since Streamlit has some deficiencies. It is good for prototyping and quick dashboards but is not suitable for more complex web apps and it cannot generate a native/non-browser UI.

Flet is the best option I’ve found, powered by Flutter. NiceGUI is a close second but it cannot generate native UIs and requires more transient dependencies than Flet. Even the devs of NiceGUI acknowledge the cons of Streamlit here:

We at Zauberzeug like Streamlit but find it does too much magic when it comes to state handling. In search for an alternative nice library to write simple graphical user interfaces in Python we discovered JustPy. Although we liked the approach, it is too "low-level HTML" for our daily usage. But it inspired us to use Vue and Quasar for the frontend.

We have built on top of FastAPI, which itself is based on the ASGI framework Starlette and the ASGI webserver Uvicorn because of their great performance and ease of use.

If there’s reluctance to add another UI library to WinPython, I would suggest at least adding sv-ttk to make tkinter somewhat tolerable to look at.

Toga (and Briefcase) from BeeWare are also promising, but I’m not sure the maturity level is quite there yet.

@stonebig
Copy link
Contributor

sv-ttk is a pertinent remark ==> added on all versions.

The search for a simple web equivalent to tcl-tk is still on the Christmas list.

@stonebig
Copy link
Contributor

stonebig commented Apr 13, 2025

for flet, I don't know: popularity is still very low vs streamlit

@stonebig
Copy link
Contributor

Image

@stonebig
Copy link
Contributor

stonebig commented Apr 13, 2025

There is flet and nicegui... they are not exactly small
Nicegui is 15Mo, flet just 0.5 Mo, before dependency tax.

@chrisrodrigue
Copy link
Author

Toga is in beta but looks promising as it targets all platforms. Learned about it on a recent Talk Python To Me podcast, BeeWare and the State of Python on Mobile.

Toga:
https://github.com/beeware/toga
https://toga.readthedocs.io/en/stable

@chrisrodrigue
Copy link
Author

chrisrodrigue commented Apr 13, 2025

sv-ttk is a pertinent remark ==> added on all versions.

https://github.com/albertosottile/darkdetect
https://github.com/Akascape/py-window-styles

These seem to be some complementary packages. First one simply reads a registry key to determine light mode/dark mode, second one adds various window visual styles and works with many of the Python GUi libs.

The search for a simple web equivalent to tcl-tk is still on the Christmas list.

Looks like web widgets are planned:

https://toga.readthedocs.io/en/stable/reference/widgets_by_platform.html

@stonebig
Copy link
Contributor

stonebig commented Apr 14, 2025

flet is rather small, all thing considered, but needs a separated flutter engine ??

toga seems interesting, but still years away:

@chrisrodrigue
Copy link
Author

flet is rather small, all thing considered, but needs a separated flutter engine ??

I think flet takes care of that under the hood. It uses a web server (Fletd) that bridges Python and Flutter. pip install flet should provide everything needed.

To run a flet app, you can use flet run app.py or execute the script directly with python app.py.

@stonebig
Copy link
Contributor

I don't see Flet exploding in use as Streamlit does... I guess we neeed to see what Flet-1.0 gives

@chrisrodrigue
Copy link
Author

Sounds good! I think winpython is otherwise using nice and mature GUI libs (pyqt being the big one).

On the CLI side, I see there is click, may want to check out typer which adds some nice syntactic sugar to click using type hints (maintained by same dev as fastapi).

@stonebig
Copy link
Contributor

typer is ok: 25k added in total

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants