MyFletifyHTML
MyFletifyHTML 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,...)
pip install fletify
Alternative
Install via Github and use the example.py to test Fletify
pip install git+https://github.com/tct123/MyFletifyHTML.git
Usage
import flet as ft
from myfletify import FletifyHTML
# Example HTML content
html_content = "<p>This is a <b>paragraph</b> with <a href='#'>a link</a></p>"
# 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=<path-to-your-html-file>)
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:
<img style="width: 200; height: 200; background-color:yellow; border-radius: 5; border: 3 solid #336699; margin:40" src="https://picsum.photos/200/200?10" alt="Example Image">
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 file for details.
Metadata
Release files for myfletify 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| myfletify-0.1.0.tar.gz | 6.1 kB | Without provenance | Details for myfletify-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| myfletify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for myfletify-0.1.0-py3-none-any.whl |
Total release size: 13.1 kB
Release files / myfletify-0.1.0.tar.gz
| Download URL | myfletify-0.1.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
801bc28dac1583c4b1eea6ef545ef27d136290bb11df6d1850bcf3747123efec
|
|
BLAKE2b-256 checksum How to use checksums |
2c786a6c8172ec4b949d4f98342e2f3a5fe49074c767e521872863e7805fb827
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.13.0 Linux/6.11.10-300.fc41.x86_64
|
Release files / myfletify-0.1.0-py3-none-any.whl
| Download URL | myfletify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6582c637e6bc083caf654443f2d61703954122c90ae1b54b01f5f73979cced4
|
|
BLAKE2b-256 checksum How to use checksums |
12d4f0e6182dd902a3b3a247d687b8442c7fd3eeb8d6aae9e17e71964c4b0b17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.13.0 Linux/6.11.10-300.fc41.x86_64
|
Security for myfletify 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.