Skip to main content

A short description of my package

Project description

PYUI(Python UI)

This project is targeted to make cross platform applications using python.PYUI is a layout pre-compiled framework for making python applications in very lightweight sizes. It uses a xml layouting system for defining layouts, python for logic and PYWebview as the renderer.Leading to a blank application size only 16MB compared to heavyweight rendering systems cosing 50+ MB or TKinter that has very legacy thread-unsafe architecture

Motivation

1.Making General Purpose Applications: This project is driven by the motivation of making a framework over python that can be used to make general purpose applications with little or no learning curve.

2.Smaller learning curve: Recent solutions for UI development mostly are hard to learn and manage. However we adopted age-old xml layouting system that makes defining UI easy for anyone with little xml/html knowlege.

3.Support of Python libaries and modules: On the logic side python can use used to it's Limit, also the threadsafe nature of the framework helps in extreme scalability.

4.Compiled Layout and Reusibility: This framework has pre-compiled layouting system.So errors in layout are identified on runtime. Also Layout supports re-usibility using PYUI Components.

Key Features of PYUI API

  1. DOM Manipulation: One can change dom components from python side.There style,class,innertext and other attributes.

  2. PYUI Custom Syscalls: Using this one can extend PYUI to support any JS libaries(chart.js and etc) by writing minimal Javascript.Or can use to commiunicate between JS ans Python runtime if needed without touching internal sockets.

  3. PYUI Hooks: If some DOM updates are fast and can be lossy but realtime one can use PYUI Hooks.This can be mostly used to stream video or audio from Python to JS runtime

  4. Window Management: A PYUI forms contain can contain more than one view(window) and PYUI provides apis to change windows dynamically. Also Exposes Webview object for PYwebview for changing the application window

  5. Forms Management: PYUI provides dedicated apis to show and hide forms.

Getting Started

Setting up project

python -m PYUI.create <directory-of-project>

This will generate boilerplate project. Following folder and files will be generated in the given directory.

layout
code
layout/JS
layout/styles
code/index.py
code/__init__.py
layout/index.xml
settings.py

Compiling project

To compile to a PYUI project and run it

python -m PYUI.buildtools --compile <directory-of-project> --run

This command will compile your project into a PYUI project and run it. Within few seconds(depending on project size) you can see you layout

To compile without running project

python -m PYUI.buildtools --compile <directory-of-project>

It will save your project in build/temp_xxxxx.yyyy (see last line of buildscript output). To launch the project go to the directory and run:

python bootstrap.py

It will launch your UI

HotReloading Layouts

You can hot-reload the layout for faster UI development.

python -m PYUI.buildtools --hotreload <layout-xml-file>

Changing the xml file will reload the UI automatically

Note: Use the --keepontop flag to keep the UI on top always

For further API references for XML and PYUI check the PYUI Documentation

Credits

PyWebview: https://github.com/r0x0r/pywebview

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyui_desktop-0.5.0.5.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyui_desktop-0.5.0.5-cp313-cp313-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.13Windows x86-64

File details

Details for the file pyui_desktop-0.5.0.5.tar.gz.

File metadata

  • Download URL: pyui_desktop-0.5.0.5.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for pyui_desktop-0.5.0.5.tar.gz
Algorithm Hash digest
SHA256 dbb5d1b955bd6fd8eb1392663c2d35944e082216d9dab5c6b1de7b526061197b
MD5 0e9ec09195b59b10f38381f2c8b9bf96
BLAKE2b-256 fdb5c0864583489ff944c4fb062e1af5155c11175d8dbd7b97fb10b0916de709

See more details on using hashes here.

File details

Details for the file pyui_desktop-0.5.0.5-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pyui_desktop-0.5.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 76afeaa930cfc8cd1b62fb9415033708683c80505922bce10e9e48fa561df01f
MD5 9e65a967e0931fbd41e924bf773fa714
BLAKE2b-256 62f1232f31d51923b231873160428788b4987f7c3cf0bc1c6f300a8dea011773

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page