https://github.com/benitmulindwa/fletifyhtml
FletifyHTML is a versatile Python tool designed to convert HTML content into Flet code.
https://github.com/benitmulindwa/fletifyhtml
design flet flet-dev fletifyhtml html5 python ui
Last synced: 5 months ago
JSON representation
FletifyHTML is a versatile Python tool designed to convert HTML content into Flet code.
- Host: GitHub
- URL: https://github.com/benitmulindwa/fletifyhtml
- Owner: Benitmulindwa
- License: mit
- Created: 2023-12-18T23:27:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-18T18:38:54.000Z (almost 2 years ago)
- Last Synced: 2025-06-22T21:04:33.877Z (7 months ago)
- Topics: design, flet, flet-dev, fletifyhtml, html5, python, ui
- Language: Python
- Homepage:
- Size: 67.4 KB
- Stars: 38
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FletifyHTML
FletifyHTML is a Python package for converting HTML content into Flet code. It allows you to embed HTML code in your Flet app
## Installation
### (Not avalaible for now,...)
```bash
pip install fletify
```
### Alternative
Install via Github and use the `example.py` to test Fletify
```bash
pip install git+https://github.com/Benitmulindwa/FletifyHTML.git
```
## Usage
```python
import flet as ft
from fletify import FletifyHTML
# Example HTML content
html_content = "
This is a paragraph with a link
"
# Create a FletifyHTML instance
fletify = FletifyHTML(html_content)
# Get the Flet code
flet_code = fletify.get_flet()
def main(page: ft.Page):
#Display the output, by adding it on the page
page.add(flet_code)
page.update()
ft.app(target=main)
```
# OutPut:

`FletifyHTML()` can receive the HTML file containing the content to be displayed, `FletifyHTML(html=)`
## Features
For now, **Fletify** support the following HTML tags:
`img`, `ul`, `ol`, `li`, `a`, `b`, `strong`, `i`, `em`, `u`, `mark`, `span`, `div`, `p`, `code`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `table`, `tr`, `th`, `td`
Fletify doesn't support CSS style however, it supports inline style using the `style` attribute.
#### eg:
```html
```
these are the supported style properties
`color`, `background-color`, `font-family`, `font-size`, `text-align`, `text-decoration`, `display`, `justify-content`, `margin`, `padding`, `border-radius`, `border`, `width`, `height`
## Contributing
If you'd like to contribute to FletifyHTML, please open an issue or submit a pull request.
🚨 Give FletifyHTML a try and tell us what you think about it.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.