Skip to main content

A tool that will GUI-ify your functions

Project description

GUIfy


Simplest form of GUI for automation scripts.

Made with eel as python backend and react used as frontend.

main branch has built&optimized react app

dev branch has development version of react app

Main tab

main_tab

Config tab

config_tab

How to use


Quick start

pip install guify

Look inside this example or follow the instructions below:

# main.py
import GUIfy from guify

app = GUIfy(app_name='GUIfy') # default app_name is 'GUIfy'

@app.register(name='Test 1', priority=0, description='This is a test')
def test_1(example_arg):
   app.monitor.clear_text()
   app.monitor.set_text('This is a test\n')
   app.monitor.append_text('This is a test2\n')
   result = app.prompt_user('This is a prompt') # True if user clicked OK, False if user clicked Cancel
   foo = app.config.get('example','foo') # == bar



app.run()

Monitor object

app.monitor is the monitor object representing the preview window on right hand side of the GUI,

  • set_text(text: str) -> None // will set the text in the monitor to whatever passed in "text" argument
  • append_text(text: str) -> None // will append the next to the monitor
  • clear_text(text: str) -> None // will clear all text in the monitor

Config tab

"app.config" is an object representing the config tab. All configurations are stored in config.ini.

self.config methods:

  • save() // Save config to config.ini
  • load() // Load config from config.ini
  • get_section() // load() and return an entire section as a dictionary
  • get(section, attribute) // load() and get value of attribute in section
  • set(section, attribute, value) // load() and set value of attribute in section and then save().

Config file:

[example]
foo = bar
get_section('example') -> {'foo': 'bar'}
get('example', 'foo') -> 'bar'

Settings

in settings.ini you can change the following settings:

  • reports_dir - the directory where the reports will be saved
  • report_name_prefix - can be one of the variables passed in to your run() functions, uses this variable name as identification for reports

Building

To build an executable in dist folder, run the following:

npm run build

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

guify-0.2.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

guify-0.2.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: guify-0.2.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for guify-0.2.0.tar.gz
Algorithm Hash digest
SHA256 196aa4459cb147d2632cc6c8a7dba4d23bdd54a4fd9d68f1fd9dc80903f40e83
MD5 dbb48be6be56b6eff285ff3737ac8f23
BLAKE2b-256 2f41e10343a9d7069aa67ec6f5712e35348cf4f5418b3bec1041d6941b8e0296

See more details on using hashes here.

File details

Details for the file guify-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: guify-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for guify-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab8cc6b3ef40f06dbf62918eabaed4b95299daba514b69921f5dffe767bccafc
MD5 2a6218bc8fd0421b5a54be39c0600a66
BLAKE2b-256 318d64042a2dbd7e4bafc9b49239de376edb2f9bbdb063fd1e675d3e1dcd8e25

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