FletifyHTML
FletifyHTML is a versatile Python tool designed to convert HTML content into Flet code.
Install / Use
/learn @Benitmulindwa/FletifyHTMLREADME
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,...)
pip install fletify
Alternative
Install via Github and use the example.py to test Fletify
pip install git+https://github.com/Benitmulindwa/FletifyHTML.git
Usage
import flet as ft
from fletify 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.
Related Skills
claude-opus-4-5-migration
84.5kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
84.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Agent Development
84.5kThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
Command Development
84.5kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
