Metadata-Version: 2.1
Name: fletil
Version: 0.3.0
Summary: A CLI for the Flet framework.
Home-page: https://gitlab.com/skeledrew/fletil
License: MIT
Keywords: flet,cli
Author: Andrew Phillips
Author-email: skeledrew@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Dist: fire (>=0.4.0,<0.5.0)
Requires-Dist: flet (>=0.1.52,<0.2.0)
Requires-Dist: loguru (>=0.6.0,<0.7.0)
Requires-Dist: watchdog (>=2.1.9,<3.0.0)
Project-URL: Repository, https://gitlab.com/skeledrew/fletil
Description-Content-Type: text/markdown

# Fletil
A CLI for the [Flet](https://flet.dev/) 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](https://docs.python.org/3/library/__main__.html)):
```python
if __name__ == "__main__":
    flet.app(target=main)
```
and not:

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

## License
MIT.

