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.0.tar.gz (4.2 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.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: webgui_py-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 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.0.tar.gz
Algorithm Hash digest
SHA256 6f58610ad395d259524f0e16d2c56577fb40cddf1a0182e463a59861ece1f578
MD5 ca796b45b8b44c565b87ab71a9e3f9b9
BLAKE2b-256 ecee6ec1dff0fcbf6dfc35b09bba23007e1db09c5a1a123ae510effe6716a006

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgui_py-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: webgui_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 323d50a1aa0254e8020f63e702a1c3af89d23a999e80a60efc2a8917c4559e66
MD5 1700a8d529c11c16aa7e2d51c3a9da52
BLAKE2b-256 a8ee82b23908d52d621b7061505d4fed9717c8b9f4ee205587707a5e31a02a67

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgui_py-0.2.0-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

0.2.1

2 files

This release

0.2.0 This release

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