DEV Community

Scriptor
Scriptor

Posted on

HTML like simplicity in python GUIs is here!

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()
Enter fullscreen mode Exit fullscreen mode

This creates a blank window with the size and background color you choose.

window


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()
Enter fullscreen mode Exit fullscreen mode

window

This shows how easy it is to create a GUI and add components—all in Python, with HTML-style simplicity.


Installation

pip install pyuikit
Enter fullscreen mode Exit fullscreen mode

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 (3)

Collapse
 
shahrouzlogs profile image
Shahrouz Nikseresht •

Welcome to DEV! Great work on building PyUIkit. Bringing HTML-like simplicity into Python GUIs is a really interesting idea. ✨

Your explanation is clear, and the examples make it easy to understand how the library works. I’ve bookmarked your post here 📌 and also starred the project on GitHub ⭐, looking forward to seeing how it grows.

Keep sharing updates, it’s always great to see new open-source tools in the Python ecosystem! 🚀🐍

Collapse
 
scriptor profile image
Scriptor •

Thank you so much for your kind words—I really appreciate it! I’ll do my best to keep improving this library in the future.

Collapse
 
shahrouzlogs profile image
Shahrouz Nikseresht •

Glad to hear that! Keep iterating on it, the concept has real potential.

I’ll check back as you release updates. 🚀