wZony
Quickly Build WebUI with Python
Installation
Via Pip
pip install wZony
Quick Start
Rapid Construction with HBulider
from wzony import *
from wzony.HNodes import *
from wzony.HBulider import *
page=Page(
HTMLSet([
NavigationBar("Demo",[A("1",href="#1"),A("2",href="#2"),A("1",href="#3")]),
VStack(HTMLSet([
VStack(HTMLSet([
Span("Hello World!")
.text_align('left'),
]))
]))
])
)
HTML-Only Construction
from wzony import *
from wzony.HNodes import *
page=Html(HTMLSet([
Head(HTMLSet([
Meta(charset='utf-8'),
Link(href="./css.css",rel="stylesheet"),
])),
Body(HTMLSet([
Div(String("1234").wrapped(Sup())),
H1("Hello"),
Thead(HTMLSet([
String("1234"),
String("1234"),
]))
.style("color:red;")
]))
]))
Save as HTML
with open('./demo.html','w') as html:
html.write(str(page))
Integration with Django
from django.http import HttpResponse
from wzony import *
from wzony.HNodes import *
from wzony.HBulider import *
page=Page(
HTMLSet([
# ...
])
)
def demoPage(request):
return HttpResponse(page)
Examples
Student Roster
from wzony import *
from wzony.HNodes import *
from wzony.HBulider import *
class Person:
def __init__(self,name,age,gender,photo='./image.jpg'):
self.name=name
self.age=age
self.gender=gender
self.photo=photo
students=[Person("Tom",18,'Male'),Person("Alice",19,'Female'),Person("Ken",20,'Male')]
page=Page(HTMLSet([
NavigationBar("Students",[A("Roster",href="#").color('gray').text_decoration('none')]),
VStack(HTMLSet([
ForEach(students,lambda student: HTMLSet([
HStack(HTMLSet([
Img(student.photo)
.width('60px')
.border_radius('500px'),
VStack(HTMLSet([
Span(f"Name: {student.name}"),
Span(f"Age: {student.age}"),
Span(f"Gender: {student.gender}")
]))
]))
.width('100%')
.text_align('left')
.border_bottom('rgb(218, 218, 218) 1px solid')
.font_size('25px')
.padding_left('50px')
.justify_content('start'),
]))
])),
]),head=HTMLSet([
Title("Students")
]))
Metadata
Release files for wZony 0.2.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 |
|---|---|---|---|---|
| wzony-0.2.0.tar.gz | 10.7 kB | Without provenance | Details for wzony-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wzony-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for wzony-0.2.0-py3-none-any.whl |
Total release size: 23.4 kB
Release files / wzony-0.2.0.tar.gz
| Download URL | wzony-0.2.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1dd6be8d9821a76f5e5e8c53a2e65b1c888a0618b5fab20594f87abf0ce5e44
|
|
BLAKE2b-256 checksum How to use checksums |
01a8047787750392bd4500e7528d3437c94be1aa35f3a4dcb11b4f048cc3179f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / wzony-0.2.0-py3-none-any.whl
| Download URL | wzony-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
089c3973c0aa180b0f2566cee17f72b47f5f15d6c7f70630c315d31004843472
|
|
BLAKE2b-256 checksum How to use checksums |
c268ef1523d48ddadbc6b27fb21c9ef4449e5c0fd3a43d7fb3b81464d739fd12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for wZony 0.2.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.