Skip to main content

gui-args-framework

gui-args-framework provides a user-friendly way to implement your Python script with GUI easily and quickly, instead of dark ugly terminal window that scares people who are far from programming.

Supposing, you have developed a program that takes arguments, does something and provides a result as text lines. Usually you develop such things as console applications that can be not so convenient to users. With gui-args-framework it can be easily done through GUI.

The example below is to understand how it works. There is a program to calculate sum of two integers:

from gui_args_framework.args_window import ArgsWindow
from gui_args_framework.fields import IntegerField


class TestWindow(ArgsWindow):
    title = "Test"
    args = [
        IntegerField(name='x', label='First'),
        IntegerField(name='y', label='Second'),
    ]
    description = "This program calculates sum of two integer numbers."

    def main(self, this):
        if this.confirm("Are you sure?"):
            z = this['x'] + this['y']
            this.message("The sum is {}".format(z))


TestWindow.run()

Installation

pip install gui-args-framework

Window parameters

You can customize your windows with following parameters:

title = "Name of your program"  # This is required
args = []  # List of arguments (see the example adove)
description = "Some description of your program."  # Default is empty

window_pos = (100, 100)  # A 2D-tuple that defines (x, y) of the absolute position of the window, default is (100, 100)
geom = (400, 400)  # A 2D-tuple that defines width and height of the window, default is (400, 400)
showTypes = False  # Show types of the arguments near the names, default is False
descriptionLimit = 50  # Maximum length of the line in the description without breaking, default is 50

This methods of this

In main function that must be overrriden there is an argument this that contains the values of GUI arguments (by their names) and it has two methods to interact with GUI.

this[name] - gets the value of the argument name.

this.message(text) - shows information dialog with text text.

this.confirm(prompt) - shows prompt dialog with text prompt, returns True or False depending on user's choice.

Field arguments

name - name of the argument. Required.

label - description of the argument (shown in GUI). Required.

required - necessity of the argument. Default is True.

default - default value of the argument. Default is None.

choices - list allowed values of the argument (for EnumField). Default is None.

Fields

StringField - string argument.

IntegerField - integer argument.

FloatField - float argument.

BooleanField - boolean argument, represented as a checkbox.

EnumField - enum argument, represented as a dropdown list (argument choices is required).

FileOpenField - argument to choose existing file.

DirectoryField - argument to choose existing directory.

FileSaveField - argument to choose a new file to save.

Metadata

Release files for gui-args-framework 1.3.0

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

Source distribution (sdist)

Source distribution for gui-args-framework 1.3.0
File Size Uploaded Provenance
gui_args_framework-1.3.0.tar.gz 7.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gui-args-framework 1.3.0
File Interpreter ABI Platform
gui_args_framework-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / gui_args_framework-1.3.0.tar.gz

Download URL gui_args_framework-1.3.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
11ad7901a251a6c7e01de09f35914034d35531d4de046a72ed24851b06981dd6
BLAKE2b-256 checksum
How to use checksums
c2af2e7f0408e78198205cbe9f3584ae489ccb6373f36467f19ac30f34abbf53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / gui_args_framework-1.3.0-py3-none-any.whl

Download URL gui_args_framework-1.3.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc0d1cee36d64729cfcdc522b26701fefcbabc2c928ec43bdd172be58dbb1fc7
BLAKE2b-256 checksum
How to use checksums
9cd6b6a576d3776dadba2ccde13d2e5a55360e458292be7cc4323da5dabcf117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for gui-args-framework 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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