Skip to main content

A CLI for the Flet framework.

Project description

Fletil

A CLI for the Flet framework.

Features

  • Exposes the standard run options for a Flet app.
  • Implements "hot reload": reloads the targeted source file whenever changes are saved, attempting to preserve the running state of controls.
    • State to preserve must be specified by passing a unique ID and list of attribute names as data to the controls, eg. TextField(value="hello world", data={"_cid": "greet_text", "_state_attrs": ["value"]}).
    • If a Syntax error is detected during a reload, it is aborted.
  • Developer buttons (a breakpoint button and code status indicator) can be temporarily injected into the page.

Installing

NOTE: this also installs Flet if it isn't present.

  • From PyPI:
    • $ pip install fletil.
  • From GitLab (NOTE: development is managed by Poetry):
    • $ git clone https://gitlab.com/skeledrew/fletil
    • $ cd fletil
    • $ poetry install

Usage

  • Ensure script is import-friendly, ie. invoke runner with (doc):
if __name__ == "__main__":
    flet.app(target=main)

and not:

flet.app(target=main)
  • Further help is available via $ fletil --help.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fletil-0.3.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

fletil-0.3.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file fletil-0.3.0.tar.gz.

File metadata

  • Download URL: fletil-0.3.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.6 Linux/5.15.0-46-generic

File hashes

Hashes for fletil-0.3.0.tar.gz
Algorithm Hash digest
SHA256 58cd1f3e6033147935b20db74400618718719bc695b0c82e1e12764745136022
MD5 c7f8b4558fb4eae570cb0d44fa37d84f
BLAKE2b-256 87e429fa49fe14b9d12121ecbe2d48bbcf35af7e606a133b14db1379046639b1

See more details on using hashes here.

File details

Details for the file fletil-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: fletil-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.6 Linux/5.15.0-46-generic

File hashes

Hashes for fletil-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0df2c19c49046ac524494e602663b1bd87b9d2477b1c93cc34a050ddbe81ae16
MD5 61d9b10be300793a6ae59498fc6a153d
BLAKE2b-256 17f101111293b3d7e66600061ab3bb5addef73c20b9dde0096c82bf2fd69e6aa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page