Skip to main content

WebGUI

A simple Python GUI framework that uses HTML as the interface.

WebGUI lets you make Python applications with a web browser as the GUI without needing to write JavaScript.

Installation

pip install webgui-py

Basic Example

import webgui
import time

webgui.init()

webgui.send("index.html")

while webgui.running():

	if webgui.button("say hello").clicked:
		print("Hello!")

	time.sleep(0.05)
<!DOCTYPE html>
<html>

<body>

<h1>My App</h1>

<p>Hello!</p>

<button name="say hello">Say Hello</button>

</body>

</html>

Getting Input

You can also ask the user for text:

name = webgui.get_input("What's your name?")

print(name)

The browser displays an input box and returns what the user entered.

Audio

WebGUI includes audio features for playing, looping, and stopping audio files.

You can play an audio file with:

webgui.audio.play("music.mp3", False)

The play() function takes two arguments: filename — the path to the audio file. loop — True to loop the audio or False to play it once. You can stop the audio with:

webgui.audio.stop()

Why WebGUI?

WebGUI is designed to be simple.

You write your interface using HTML and control your application using Python.

You don't need to write JavaScript or deal directly with HTTP communication.

Features

  • HTML-based GUI
  • Python controls the application
  • Automatic browser opening
  • Simple button handling
  • Text input
  • audio player
  • Multiple HTML pages
  • No JavaScript required in your application

License

See the LICENSE file.

Download files

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

Source Distribution

webgui_py-0.2.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

webgui_py-0.2.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file webgui_py-0.2.1.tar.gz.

File metadata

  • Download URL: webgui_py-0.2.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for webgui_py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0b87425479a461f3dee2d0d1b05973fb109b6508f195e543fd3b81bb89a9ec0c
MD5 ae124fbd586d11eec9305fdf9043fef8
BLAKE2b-256 50117b1d3a90fe4e4a0f21e67e3fd45d83e0fc4bb0105f5f774dad9096c6c0da

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgui_py-0.2.1.tar.gz:

Publisher: publish.yml on gordoprime00/webgui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgui_py-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: webgui_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for webgui_py-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce1bcbfef358a676c35535291d7bde932c866e5249019c10df9edc09f8a18b24
MD5 010321913ec811b8ab8b19572ae5a1cc
BLAKE2b-256 28926e3e32e912b9aaf67f71604b791752aed030a4cce0d749919b79032b6a47

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgui_py-0.2.1-py3-none-any.whl:

Publisher: publish.yml on gordoprime00/webgui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.2

2 files

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.0

2 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