apikeyper.ui package

Module contents

Project: APIKeyPER Author: Inspyre Softworks - https://inspyre.techCreated: 5/21/2023 @ 10:18 PM File:

Name: __init__.py Filepath: apikeyper/ui

class apikeyper.ui.CLI(db_file_path)[source]

Bases: object

This class provides a command line interface for managing API keys stored in a SQLite database.

apikeyper

An instance of the APIKeyPER class for managing API keys.

Type:

APIKeyPER

class apikeyper.ui.UserInputHandler(use_gui=False)[source]

Bases: object

This class handles user input, either through a graphical user interface (GUI) or command line interface (CLI).

use_gui

Whether to use a GUI for input.

Type:

bool

__gui

The PySimpleGUI instance for GUI input. None if use_gui is False.

Type:

PySimpleGUI, optional

get_password(skip_formatting=False, prompt=None, **kwargs)[source]

Gets a password from the user, either through a GUI or CLI.

Parameters:
  • skip_formatting (bool, optional) – Whether to skip formatting the prompt string. Defaults to False.

  • prompt (str, optional) – The prompt to display to the user. Defaults to None.

Returns:

The password entered by the user.

Return type:

str

prompt(msg)[source]

Prompt the end-user for input.

Parameters:

msg (str) – The message the user sees when prompted.

Returns:

The input provided by the user in answer.

Return type:

str