⚡Flet-Easy is a user-friendly add-on package for Flet, offering a cleaner code structure with numerous customizable features like JWT, routers, decorators, middleware and more.
Project description
🔥Flet-Easy
Flet-Easy
is a package built as an add-on for Flet
, designed for beginners what it does is to make Flet
easier when building your apps, with a tidier and simpler code.
Features
- Easy to use (hence the name).
- Facilitates
flet
event handling. - Simple page routing (There are three ways) for whichever one suits you best. (
Docs
) - App construction with numerous pages and custom flet configurations for desktop, mobile and web sites.
- Provides a better construction of your code, which can be scalable and easy to read (it adapts to your preferences, there are no limitations).
- Dynamic routing, customization in the routes for greater accuracy in sending data. (
Docs
) - Routing protection (
Docs
) - Custom Page 404 (
Docs
) - Controlled data sharing between pages. (
Docs
) - Asynchronous support.
- Middleware Support (in the app in general and in each of the pages). (
Docs
) - JWT support for authentication sessions in the data parameter. (useful to control the time of sessions) (
Docs
) - Working with other applications. (
Docs
) - CLI to create app structure
FletEasy
(fs init
) (Docs
) - Easy integration of
on_keyboard_event
in each of the pages. (Docs
) - Use the percentage of the page width and height of the page with
on_resize
. (Docs
) ResponsiveControlsy
control to make the app responsive, useful for desktop applications. (Docs
)- Soporta Application Packaging para su distribución. (view)
📌Flet events it handles
on_route_change
: Dynamic routingon_view_pop
on_keyboard_event
on_resize
on_error
💻 Ways to install
Ways to install
Install Flet-Easy Complete
[!NOTE] If you use the
fs
cli, it is important to havegit
installed.
Installs all the dependencies to use, you can use all the functionalities provided by FletEasy
pip install flet-easy[all]
Install clean Flet-Easy
Requires installation of Flet >= 0.21.
pip install flet
If you do not use: CLI-to-create-app
pip install flet-easy
Install FletEasy if you need to use Basic-JWT
pip install flet-easy[JWT]
💻Update
pip install flet-easy --upgrade
🔥Flet-Easy app example
Here is an example of an application with 2 pages, "Home" and "Counter":
import flet as ft
import flet_easy as fs
app = fs.FletEasy(route_init="/flet-easy")
# We add a page
@app.page(route="/flet-easy", title="Flet-Easy")
def index_page(data: fs.Datasy):
return ft.View(
controls=[
ft.Text("Home page"),
ft.FilledButton("Go to Counter", on_click=data.go("/counter")),
],
vertical_alignment="center",
horizontal_alignment="center",
)
# We add a second page
@app.page(route="/counter", title="Counter")
def counter_page(data: fs.Datasy):
page = data.page
txt_number = ft.TextField(value="0", text_align="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()
return ft.View(
controls=[
ft.Row(
[
ft.IconButton(ft.icons.REMOVE, on_click=minus_click),
txt_number,
ft.IconButton(ft.icons.ADD, on_click=plus_click),
],
alignment="center",
),
ft.FilledButton("Go to Home", on_click=data.go("/flet-easy")),
],
vertical_alignment="center",
horizontal_alignment="center",
)
# We run the application
app.run()
🎬 Demo
🚀 How to use Flet-Easy
?
[!IMPORTANT] 📑Documentation: https://daxexs.github.io/flet-easy/0.2.0/
👀 Code examples
🔎 Contribute to this project
Read the CONTRIBUTING.md file
🧾 License
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 Distribution
File details
Details for the file flet_easy-0.2.7.tar.gz
.
File metadata
- Download URL: flet_easy-0.2.7.tar.gz
- Upload date:
- Size: 27.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.19.3 CPython/3.12.7 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a923fa6b1d7b1addc31c0355d2158a8f487beea8019aa58ded147d238c19391f |
|
MD5 | 4675ba93db688d81cf164d8dee93d0bd |
|
BLAKE2b-256 | b63fd9ff737de9e4c07481521b5caf8ef0f5fcd171164fa38a6c01ad76b1b5dd |
File details
Details for the file flet_easy-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: flet_easy-0.2.7-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.19.3 CPython/3.12.7 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f43c8108e8a0e5bf234bee3eb2eae822a9c8d8457798abaa9c695663cf07d545 |
|
MD5 | 239258ab7cf1d385654f73f3b88cb1ad |
|
BLAKE2b-256 | 26d773fdc36d47f3256000fbbbc0f41cbe63fe155230f0928ec6b8ac094b7b54 |