flet-easy


Nameflet-easy JSON
Version 0.2.7 PyPI version JSON
download
home_pageNone
Summary⚡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.
upload_time2024-10-29 20:08:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseapache-2.0
keywords flet easy flet python flet route flet easy route python web template app python flet mvc flet easy mvc flet easy fastapi flutter python web application flet middleware flet jwt fast flet
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🔥Flet-Easy

<div align="center">

[![github](https://img.shields.io/badge/my_profile-000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/Daxexs)[![pypi](https://img.shields.io/badge/Pypi-0A66C2?style=for-the-badge&logo=pypi&logoColor=white)](https://pypi.org/project/flet-easy)

[![image](https://img.shields.io/pypi/pyversions/flet-easy.svg)](https://pypi.python.org/pypi/flet-easy) [![image](https://img.shields.io/pypi/v/flet-easy.svg)](https://pypi.python.org/pypi/flet-easy) [![image](https://img.shields.io/pypi/l/flet-easy.svg)](https://pypi.python.org/pypi/flet-easy) [![socket](https://socket.dev/api/badge/pypi/package/flet-easy/0.2.2#1725204521828)](https://socket.dev/pypi/package/flet-easy) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Downloads](https://static.pepy.tech/badge/flet-easy)](https://pepy.tech/project/flet-easy)

<img src="https://github.com/Daxexs/flet-easy/blob/main/media/logo.png?raw=true" alt="logo" width="250">

`Flet-Easy` is a package built as an add-on for [`Flet`](https://github.com/flet-dev/flet), designed for beginners what it does is to make `Flet` easier when building your apps, with a tidier and simpler code.
</div>

## 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`**](https://daxexs.github.io/flet-easy/0.2.0/dynamic-routes/))
* 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`**](https://daxexs.github.io/flet-easy/0.2.0/dynamic-routes/#custom-validation))
* Routing protection ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/customized-app/route-protection/))
* Custom Page 404 ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/customized-app/page-404/))
* Controlled data sharing between pages. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/data-sharing-between-pages/))
* Asynchronous support.
* Middleware Support (in the app in general and in each of the pages). ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/middleware/))
* JWT support for authentication sessions in the data parameter. (useful to control the time of sessions) ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/basic-jwt/))
* Working with other applications. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/data-sharing-between-pages/))
* CLI to create app structure `FletEasy` (`fs init`) ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/cli-to-create-app/))
* Easy integration of `on_keyboard_event` in each of the pages. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/events/keyboard-event/))
* Use the percentage of the page width and height of the page with `on_resize`. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/events/on-resize/))
* `ResponsiveControlsy` control to make the app responsive, useful for desktop applications. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/responsiveControlsy/))
* Soporta Application Packaging para su distribución. ([view](https://flet.dev/docs/publish))

## 📌Flet events it handles

* `on_route_change` :  Dynamic routing
* `on_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`](https://daxexs.github.io/flet-easy/0.2.0/cli-to-create-app/) cli, it is important to have [`git`](https://git-scm.com/downloads) installed.

Installs all the dependencies to use, you can use all the functionalities provided by FletEasy

```bash
pip install flet-easy[all]
```

---

### Install clean Flet-Easy

> [!TIP]
> [Recommended for `Flet` Packaging Application](https://flet.dev/docs/publish).

Requires installation of [Flet >= 0.21](https://github.com/flet-dev/flet).

```bash
pip install flet
```

#### If you do not use: [CLI-to-create-app](https://daxexs.github.io/flet-easy/0.2.0/cli-to-create-app)

```bash
pip install flet-easy
```

---

#### Install FletEasy if you need to use [Basic-JWT](https://daxexs.github.io/flet-easy/0.2.0/basic-jwt)

```bash
pip install flet-easy[JWT]
```

---

## 💻Update

```bash
  pip install flet-easy --upgrade
```

## 🔥Flet-Easy app example

Here is an example of an application with 2 pages, "Home" and "Counter":

```python
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**

![app example](https://github.com/Daxexs/flet-easy/blob/main/media/app-example.gif?raw=true "app example")

## 🚀 How to use `Flet-Easy`?

> [!IMPORTANT]
> 📑Documentation: <https://daxexs.github.io/flet-easy/0.2.0/>

## 👀 Code examples

> [!TIP]
> <https://github.com/Daxexs/flet-easy/tree/main/tests>

## 🔎 Contribute to this project

Read the [CONTRIBUTING.md](https://github.com/Daxexs/flet-easy/blob/main/CONTRIBUTING.md) file

## 🧾 License

[Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "flet-easy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "flet easy, flet, python, flet route, flet easy route, python web template, app python, flet mvc, flet easy mvc, flet easy fastapi, flutter python, web application, flet middleware, flet jwt, fast flet",
    "author": null,
    "author_email": "Daxexs <Daxexsdev@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b6/3f/d9ff737de9e4c07481521b5caf8ef0f5fcd171164fa38a6c01ad76b1b5dd/flet_easy-0.2.7.tar.gz",
    "platform": null,
    "description": "# \ud83d\udd25Flet-Easy\n\n<div align=\"center\">\n\n[![github](https://img.shields.io/badge/my_profile-000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/Daxexs)[![pypi](https://img.shields.io/badge/Pypi-0A66C2?style=for-the-badge&logo=pypi&logoColor=white)](https://pypi.org/project/flet-easy)\n\n[![image](https://img.shields.io/pypi/pyversions/flet-easy.svg)](https://pypi.python.org/pypi/flet-easy) [![image](https://img.shields.io/pypi/v/flet-easy.svg)](https://pypi.python.org/pypi/flet-easy) [![image](https://img.shields.io/pypi/l/flet-easy.svg)](https://pypi.python.org/pypi/flet-easy) [![socket](https://socket.dev/api/badge/pypi/package/flet-easy/0.2.2#1725204521828)](https://socket.dev/pypi/package/flet-easy) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Downloads](https://static.pepy.tech/badge/flet-easy)](https://pepy.tech/project/flet-easy)\n\n<img src=\"https://github.com/Daxexs/flet-easy/blob/main/media/logo.png?raw=true\" alt=\"logo\" width=\"250\">\n\n`Flet-Easy` is a package built as an add-on for [`Flet`](https://github.com/flet-dev/flet), designed for beginners what it does is to make `Flet` easier when building your apps, with a tidier and simpler code.\n</div>\n\n## Features\n\n* Easy to use (**hence the name**).\n* Facilitates `flet` event handling.\n* Simple page routing (There are three ways) for whichever one suits you best. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/dynamic-routes/))\n* App construction with numerous pages and custom flet configurations for desktop, mobile and web sites.\n* Provides a better construction of your code, which can be scalable and easy to read (it adapts to your preferences, there are no limitations).\n* Dynamic routing, customization in the routes for greater accuracy in sending data. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/dynamic-routes/#custom-validation))\n* Routing protection ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/customized-app/route-protection/))\n* Custom Page 404 ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/customized-app/page-404/))\n* Controlled data sharing between pages. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/data-sharing-between-pages/))\n* Asynchronous support.\n* Middleware Support (in the app in general and in each of the pages). ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/middleware/))\n* JWT support for authentication sessions in the data parameter. (useful to control the time of sessions) ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/basic-jwt/))\n* Working with other applications. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/data-sharing-between-pages/))\n* CLI to create app structure `FletEasy` (`fs init`) ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/cli-to-create-app/))\n* Easy integration of `on_keyboard_event` in each of the pages. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/events/keyboard-event/))\n* Use the percentage of the page width and height of the page with `on_resize`. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/events/on-resize/))\n* `ResponsiveControlsy` control to make the app responsive, useful for desktop applications. ([**`Docs`**](https://daxexs.github.io/flet-easy/0.2.0/responsiveControlsy/))\n* Soporta Application Packaging para su distribuci\u00f3n. ([view](https://flet.dev/docs/publish))\n\n## \ud83d\udcccFlet events it handles\n\n* `on_route_change` :  Dynamic routing\n* `on_view_pop`\n* `on_keyboard_event`\n* `on_resize`\n* `on_error`\n  \n## \ud83d\udcbb Ways to install\n\n## Ways to install\n\n### Install Flet-Easy Complete\n\n> [!NOTE]\n> If you use the [`fs`](https://daxexs.github.io/flet-easy/0.2.0/cli-to-create-app/) cli, it is important to have [`git`](https://git-scm.com/downloads) installed.\n\nInstalls all the dependencies to use, you can use all the functionalities provided by FletEasy\n\n```bash\npip install flet-easy[all]\n```\n\n---\n\n### Install clean Flet-Easy\n\n> [!TIP]\n> [Recommended for `Flet` Packaging Application](https://flet.dev/docs/publish).\n\nRequires installation of [Flet >= 0.21](https://github.com/flet-dev/flet).\n\n```bash\npip install flet\n```\n\n#### If you do not use: [CLI-to-create-app](https://daxexs.github.io/flet-easy/0.2.0/cli-to-create-app)\n\n```bash\npip install flet-easy\n```\n\n---\n\n#### Install FletEasy if you need to use [Basic-JWT](https://daxexs.github.io/flet-easy/0.2.0/basic-jwt)\n\n```bash\npip install flet-easy[JWT]\n```\n\n---\n\n## \ud83d\udcbbUpdate\n\n```bash\n  pip install flet-easy --upgrade\n```\n\n## \ud83d\udd25Flet-Easy app example\n\nHere is an example of an application with 2 pages, \"Home\" and \"Counter\":\n\n```python\nimport flet as ft\nimport flet_easy as fs\n\napp = fs.FletEasy(route_init=\"/flet-easy\")\n\n# We add a page\n@app.page(route=\"/flet-easy\", title=\"Flet-Easy\")\ndef index_page(data: fs.Datasy):\n    return ft.View(\n        controls=[\n            ft.Text(\"Home page\"),\n            ft.FilledButton(\"Go to Counter\", on_click=data.go(\"/counter\")),\n        ],\n        vertical_alignment=\"center\",\n        horizontal_alignment=\"center\",\n    )\n\n# We add a second page\n@app.page(route=\"/counter\", title=\"Counter\")\ndef counter_page(data: fs.Datasy):\n    page = data.page\n\n    txt_number = ft.TextField(value=\"0\", text_align=\"right\", width=100)\n\n    def minus_click(e):\n        txt_number.value = str(int(txt_number.value) - 1)\n        page.update()\n\n    def plus_click(e):\n        txt_number.value = str(int(txt_number.value) + 1)\n        page.update()\n\n    return ft.View(\n        controls=[\n            ft.Row(\n                [\n                    ft.IconButton(ft.icons.REMOVE, on_click=minus_click),\n                    txt_number,\n                    ft.IconButton(ft.icons.ADD, on_click=plus_click),\n                ],\n                alignment=\"center\",\n            ),\n            ft.FilledButton(\"Go to Home\", on_click=data.go(\"/flet-easy\")),\n        ],\n        vertical_alignment=\"center\",\n        horizontal_alignment=\"center\",\n    )\n\n# We run the application\napp.run()\n```\n\n## \ud83c\udfac **Demo**\n\n![app example](https://github.com/Daxexs/flet-easy/blob/main/media/app-example.gif?raw=true \"app example\")\n\n## \ud83d\ude80 How to use `Flet-Easy`?\n\n> [!IMPORTANT]\n> \ud83d\udcd1Documentation: <https://daxexs.github.io/flet-easy/0.2.0/>\n\n## \ud83d\udc40 Code examples\n\n> [!TIP]\n> <https://github.com/Daxexs/flet-easy/tree/main/tests>\n\n## \ud83d\udd0e Contribute to this project\n\nRead the [CONTRIBUTING.md](https://github.com/Daxexs/flet-easy/blob/main/CONTRIBUTING.md) file\n\n## \ud83e\uddfe License\n\n[Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/)\n",
    "bugtrack_url": null,
    "license": "apache-2.0",
    "summary": "\u26a1Flet-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.",
    "version": "0.2.7",
    "project_urls": {
        "Changelog": "https://github.com/Daxexs/flet-easy/blob/main/CHANGELOG.md",
        "Documentation": "https://daxexs.github.io/flet-easy",
        "Homepage": "https://github.com/Daxexs",
        "Repository": "https://github.com/Daxexs/flet-easy"
    },
    "split_keywords": [
        "flet easy",
        " flet",
        " python",
        " flet route",
        " flet easy route",
        " python web template",
        " app python",
        " flet mvc",
        " flet easy mvc",
        " flet easy fastapi",
        " flutter python",
        " web application",
        " flet middleware",
        " flet jwt",
        " fast flet"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26d773fdc36d47f3256000fbbbc0f41cbe63fe155230f0928ec6b8ac094b7b54",
                "md5": "239258ab7cf1d385654f73f3b88cb1ad",
                "sha256": "f43c8108e8a0e5bf234bee3eb2eae822a9c8d8457798abaa9c695663cf07d545"
            },
            "downloads": -1,
            "filename": "flet_easy-0.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "239258ab7cf1d385654f73f3b88cb1ad",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 30392,
            "upload_time": "2024-10-29T20:08:13",
            "upload_time_iso_8601": "2024-10-29T20:08:13.681072Z",
            "url": "https://files.pythonhosted.org/packages/26/d7/73fdc36d47f3256000fbbbc0f41cbe63fe155230f0928ec6b8ac094b7b54/flet_easy-0.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b63fd9ff737de9e4c07481521b5caf8ef0f5fcd171164fa38a6c01ad76b1b5dd",
                "md5": "4675ba93db688d81cf164d8dee93d0bd",
                "sha256": "a923fa6b1d7b1addc31c0355d2158a8f487beea8019aa58ded147d238c19391f"
            },
            "downloads": -1,
            "filename": "flet_easy-0.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "4675ba93db688d81cf164d8dee93d0bd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27405,
            "upload_time": "2024-10-29T20:08:15",
            "upload_time_iso_8601": "2024-10-29T20:08:15.154782Z",
            "url": "https://files.pythonhosted.org/packages/b6/3f/d9ff737de9e4c07481521b5caf8ef0f5fcd171164fa38a6c01ad76b1b5dd/flet_easy-0.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 20:08:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Daxexs",
    "github_project": "flet-easy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "flet-easy"
}
        
Elapsed time: 0.55532s