Skip to main content

UiWizard

UiWizard is a python-based ui-framework for the web. It was inspired by the great framework NiceGui. Why create this project that is very similar to NiceGui?

  • The first reason was that NiceGui requires websockets to work and when experimenting with the framework it caused some issues on my hosting platform.
  • Learning. I wanted to figure out how to do something simillar but without using websockets
    • I wanted to try out HTMX
  • Limited control over the underlaying tech stack but mainly just learning

Example and docs UI-Wizard

Features

  • Tailwind and DaisyUI for the graphics and responsive layout
  • Webbased
  • Quite a lot of standard elements, input fields, dropdown, foot, header, tabs...
  • HTMX for interactivity
  • Hopefully great defaults!

Usage

Install the library

pip install uiwiz

Create a main.py file

import uvicorn

from uiwiz import ui, UiwizApp

app = UiwizApp()


@app.page("/")
async def home_page():
    ui.label("Hello world")


if __name__ == "__main__":
    uvicorn.run(app)

Run it

python main.py

General info

HTMX works with input fields in HTML and forms. To make it a bit easier to work with the form submit event does not send the data in the normal form format but uses the HTMX extension to convert it to json. This means that endpoints using UiWizard can use pydantic models as the input and have the benefit of validation.

Tests

uv run coverage run -m pytest .
uv run coverage html

Custom development server

A custom server has been developed to improve reload speed. Uvicorn has a builtin feature to reload the application this however requires a full process to be restarted, which on some operation systems might take >2s to complete. The custom server can reload only the nesscary part of the application in milliseconds. Instead of a process it uses a thread to achive the same result. One should know that it does not run the life-cycle start/stop. This will require a full reload of the application. It reloads the endpoints on every request.

Example

from uiwiz import ui, UiwizApp, server

app = UiwizApp()


@app.page("/")
async def home_page():
    ui.label("Hello world")


if __name__ == "__main__":
    server.run("main:app")

Metadata

Release files for uiwiz 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uiwiz 0.3.0
File Size Uploaded
uiwiz-0.3.0.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for uiwiz 0.3.0
File Interpreter ABI Platform
uiwiz-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.1 MB

Release files / uiwiz-0.3.0.tar.gz

Download URL uiwiz-0.3.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
ff70b5910379e42d53d838bc811fa447319f4705449139b901213faf45d6c7ec
BLAKE2b-256 checksum
How to use checksums
16c0356856020dbfead9141292672be9e7c99c8aa03de4e647a5ed081e2bf4ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / uiwiz-0.3.0-py3-none-any.whl

Download URL uiwiz-0.3.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
344f044391c37f59f29daa04d59f9ea61dce429955582e0bc68d7eec4b2d471f
BLAKE2b-256 checksum
How to use checksums
8f8a2ddde2c558ba8a2da505ea15a7a92aa58479562c90e36df80a091c2547cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.5

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.80

2 release files

0.1.79

2 release files

0.1.78

2 release files

0.1.77

2 release files

0.1.76

2 release files

0.1.72

2 release files

0.1.71

2 release files

0.1.70

2 release files

0.1.69

2 release files

0.1.68

2 release files

0.1.67

2 release files

0.1.63

2 release files

0.1.62

2 release files

0.1.58

2 release files

0.1.57

2 release files

0.1.56

2 release files

0.1.55

2 release files

0.1.54

2 release files

0.1.53

2 release files

0.1.51

2 release files

0.1.50

2 release files

0.1.49

2 release files

0.1.48

2 release files

0.1.47

2 release files

0.1.46

2 release files

0.1.45

2 release files

0.1.41

2 release files

0.1.40

2 release files

0.1.39

2 release files

0.1.37

2 release files

0.1.36

2 release files

0.1.35

2 release files

0.1.33

2 release files

0.1.31

2 release files

0.1.30

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page