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.2.tar.gz (4.8 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.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: webgui_py-0.2.2.tar.gz
  • Upload date:
  • Size: 4.8 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.2.tar.gz
Algorithm Hash digest
SHA256 1ce698e42bca28024e1f3d4711fcc7f19065dcab5ed2524eb4bee8505531e4fc
MD5 152b467e419ba4ac3adb53f07b004a25
BLAKE2b-256 d81a3ed8703af785e95ea0ae7ae00ee1b554738f3e5b45d101891f10702f3292

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: webgui_py-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3807205967b37680be81f3e81507645bc8c64222957980a2bfc06e30502e161c
MD5 bc64e86c82e999158a21fd82e64ff0b9
BLAKE2b-256 ae8c0e2463a49e8db8238673fb8309664c2fcad81c5893688dbfd07bbf997a14

See more details on using hashes here.

Provenance

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

This release

0.2.2 This release

2 files

0.2.1

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