Skip to main content

Hosguibase - A multi-backend GUI toolkit

Hosguibase a toolkit for making graphical user interfaces using Python Hosguibase uses other toolkits as its backends, which allow programs to look native on many platforms. Some backends may have qualities that make them better suited for certain tasks.

Hosguibase does not aim to expose all or even many functionalities of its backends. On the contrary, we look for a minimal feature set that can be used to create acceptable applications. This minimalism is to ease the workload needed to maintain multiple backends. You can use the features of a backend directly but this will likely lock you down to that specific backend (which may not be bad at all).

Hosguibase is developed by DEV Joni since 2023. Currently, the project is in an early stage not recommended for production.

Installing

pip install devjoni-hosguibase

API Overview

Widgets

  • MainWindow - The main window
  • FrameWidget - Containment and partitioning
  • TextWidget - Non-editable text (label)
  • ButtonWidget - Clickable -> command
  • SliderWidget - Slidable (scale)
  • EntryWidget - Single-line editable text
  • EditorWidget - Multiline editable text
  • DropdownWidget - Selection (optionmenu)
  • ImageWidget - Shows an image

The API resembles tkinter. When creating a new widget, you specify its parent and then make the widget appear on the screen by using the grid method.

A hello world example

import devjoni.guibase as gb

app = gb.MainWindow()
app.title = "My graphical program"
app.geometry = "small"

hello = gb.TextWidget(app)
hello.grid(row=0, column=0)

hello.set(text='Hello world!')

app.run()

Supported Backends

Default backend: tkinter

  • tkinter : The GUI toolkit based on tcl/tk that comes with Python
  • gtk3/4 (via gi): A toolkit used for example by GNOME
  • p3d : Panda3D - The open-source 3D rendering engine

The backend is currently selected with flags to the program.

Tkinter backend (default)

Launching

python myprogram.py --tk

GTK backends

Requirements

pip install PyGObject

Launching version 3

python myprogram.py --gtk3

or version 4

python myprogram.py --gtk4

Panda3D backend

Requirements

pip install Panda3D

Launching

python myprogram.py --p3d

Current Limitations

  • Only grid layout engine supported (no free placement of widgets)
  • Playing videos or 3D graphics not straighforward
  • No dedicated touch or joystick support

Contributing

Reporting Issues

Please feel free to report any bugs or issues in our bug tracker in Github:

https://github.com/devjonix/hosguibase/issues

Pull Requests

Despite commercial backing this is a true open-source project. We appriciate any inputs to the project as GitHub pull requests.

Metadata

Release files for devjoni-hosguibase 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devjoni-hosguibase 0.0.7
File Size Uploaded
devjoni_hosguibase-0.0.7.tar.gz 45.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for devjoni-hosguibase 0.0.7
File Interpreter ABI Platform
devjoni_hosguibase-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 96.2 kB

Release files / devjoni_hosguibase-0.0.7.tar.gz

Download URL devjoni_hosguibase-0.0.7.tar.gz
Size 45.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8780f944691bedc903122d597bb7e95cb0e44347577e0f004d502d9b44a3e213
BLAKE2b-256 checksum
How to use checksums
645913a2fbbf72c9e834b0f93fac42e1eb0eeed11f494f5edb7a31169c5e7a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / devjoni_hosguibase-0.0.7-py3-none-any.whl

Download URL devjoni_hosguibase-0.0.7-py3-none-any.whl
Size 51.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e28c3101c4c3649c3fac89be100e7de02c9a22c4084a53ac5fa3ebdefe3c63f1
BLAKE2b-256 checksum
How to use checksums
06354cf2f4cc09eb00261581d43e84c7f7abee0b61de491c47459447bad6b419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release 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