The APyT GUI forms module

This module provides a lightweight graphical user interface (GUI) for interactive data entry forms using Tkinter. It is intended for situations where command-line input is insufficient or where a simple, cross-platform dialog is preferred.

Currently, the module focuses on login functionality, offering a secure and user-friendly way to collect authentication credentials during runtime.

List of functions

  • login()

    Open a graphical login dialog to collect username and password.

apyt.gui.forms.login()[source]

Open a graphical login dialog to collect username and password.

A themed Tkinter window is created with input fields for the username and password, along with a “Login” button. The password field masks input characters. The dialog is centered on the screen and cannot be closed without entering credentials. Pressing the Enter key also submits the form.

Returns:

A 2-tuple containing the username and password entered by the user.

Return type:

tuple of (str, str)