Skip to main content

A simplified widget toolkit supporting many backends

Project description

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.

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

devjoni_hosguibase-0.0.5.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

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

devjoni_hosguibase-0.0.5-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

Details for the file devjoni_hosguibase-0.0.5.tar.gz.

File metadata

  • Download URL: devjoni_hosguibase-0.0.5.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for devjoni_hosguibase-0.0.5.tar.gz
Algorithm Hash digest
SHA256 40f8c993ce7e2cb35bbe9b121de8161b1d77aad5221ffd9f840a423e40ccea60
MD5 a39b01039aec2c50ae6b7933e8b2d3ab
BLAKE2b-256 fdd93643c67802f0c22bd26b69bcbf8c970fbf5d19d0e398a2a8a7affaa5d25a

See more details on using hashes here.

File details

Details for the file devjoni_hosguibase-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for devjoni_hosguibase-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d34f834650a8d2af9ff6d42bf5a201317d8e3c4b9f06fea11bf553a0945260c6
MD5 ca70378d3506808798bc7b8e7aacd832
BLAKE2b-256 bb9de0792e3d964b63ecb0bde2f3ef8a35a9376b9d9f745483db3bc65208704b

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