Skip to main content

turn (almost) any python functions into a gui in a few lines of code

Project description

PyGUIAdapter

A GUI adapter for python functions.

It is used to make gui for almost any python functions in just a few lines.

Turn your function(s) into gui is easy:

  1. Import GUIAdapter from pyguiadapter.adapter package
  2. Write your functions
  3. Create an instance of GUIAdapter
  4. Add your function(s) to the instance
  5. Invoke run() method of the instance

Simple example:

from pyguiadapter.adapter import GUIAdapter

def user_function(a: int, b: int) -> int:
    """This is a user function."""
    return a + b


gui_adapter = GUIAdapter()
gui_adapter.add(user_function)
gui_adapter.run()

Check examples/ for more examples.

Check screenshots/ for the screenshot of the examples.

Current Status

I spent almost a week of my spare time to create this library.

The code is not that fancy but it works.

A lot of work is still to be done, including:

  1. a stable api
  2. i18n
  3. more tests
  4. more examples
  5. more widget types
  6. documentation
  7. and so on

Any help and suggestions are welcomed

Underlying...

GUIAdapter is built on top of function2widgets(also my own library which is based on PyQt6).

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

pyguiadapter-0.2.2.tar.gz (67.2 kB view hashes)

Uploaded Source

Built Distribution

pyguiadapter-0.2.2-py3-none-any.whl (154.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page