Hey Python devs! 👋
I’m excited to share PyUIkit 1.0.0, a library that brings HTML-like simplicity to Python GUIs. With PyUIkit, you can create interactive desktop apps quickly using Div-based layouts and reusable components—no messy layout code required.
Example: Create a Window
from pyuikit import Body
app = Body(width=400, height=300, bg_color='white')
app.run()
This creates a blank window with the size and background color you choose.
Example: Add Components
from pyuikit import Body, Div
from pyuikit.components import Text, Button, Input
def greet():
name = Input.get_input(id='name_input')
Text.set_text(id='greeting', new_text=f'Hello, {name}!')
app = Body(width=400, height=300, bg_color='white')
Div(
width=360,
height=250,
children=[
Text(text='Enter your name:'),
Input(placeholder='Name',id='name_input'),
Button(text='Greet',on_click=greet),
Text(text='', id='greeting')
]
)
app.run()
This shows how easy it is to create a GUI and add components—all in Python, with HTML-style simplicity.
Installation
pip install pyuikit
Get started:
I’m open to PRs, feedback, and feature requests—issues can be reported on GitHub.
Would love to hear what you think! 🙂


Top comments (0)