Metadata-Version: 2.4
Name: flet-toolkit
Version: 0.23.0
Summary: Utility helpers, reusable components and storage layer for Flet 0.23.0 applications
Project-URL: Homepage, https://github.com/example/flet-utils
Project-URL: Bug Tracker, https://github.com/example/flet-utils/issues
Author: flet-utils contributors
License: MIT
License-File: LICENSE
Keywords: components,flet,sqlite,ui,utilities
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.8
Requires-Dist: flet==0.23.0
Requires-Dist: openpyxl==3.1.5
Requires-Dist: pandas==3.0.0
Description-Content-Type: text/markdown

# flet-utils

Utility helpers, reusable components and a lightweight storage layer for [Flet](https://flet.dev) `0.23.0` applications.

## Features

- **AppStorage** — one-line SQLite setup: creates all required tables automatically.
- **import_data** — load rows from an `.xlsx` file into any table.
- **build_columns / build_rows** — generate `DataColumn` / `DataRow` lists with optional action buttons based on the current user role.
- **build_product_cards** — render a list of product `Card` widgets with discount highlighting and role-based controls.
- **run** — launch the bundled reference application.

## Requirements

- Python ≥ 3.8
- `flet == 0.23.0`
- `pandas`
- `openpyxl`

## Installation

```bash
pip install flet-utils
```

## Quick start

```python
from flet_utils import AppStorage, import_data

store = AppStorage("my_app")
db = store.db

import_data(db, "products.xlsx", "products")
```

### Run the reference app

```bash
flet-utils
```

or from Python:

```python
from flet_utils import run
run()
```

## Module overview

| Module | Purpose |
|---|---|
| `flet_utils.storage` | `AppStorage` — initialises the SQLite database |
| `flet_utils.importer` | `import_data` — Excel → table |
| `flet_utils.components` | `build_columns`, `build_rows`, `build_product_cards` |
| `flet_utils.app` | `main`, `run` — complete Flet application |

## License

MIT
