Skip to main content

FlowPanel

FlowPanel is a Python package for creating a customizable graphical user interface (GUI) using tkinter. It allows users to configure a panel with various types of input fields and execute a function with multithreading support.

Features

  • Dynamic Input Fields: Supports multiple input types including entry fields, comboboxes, checkboxes, and listboxes.
  • Progress Tracking: Provides a progress bar to indicate ongoing operations.
  • Messaging System: Appends messages to a text area with color-coding based on the message type.
  • Help Functionality: Opens a help window with support for text and PDF files.
  • Multithreading: Runs background tasks without freezing the GUI.
  • Customizable GUI: Easily adjust the panel title, descriptions, and input fields.

Installation

To use FlowPanel, you need to have Python 3.x installed on your system. Clone the repository or download the package files.

Install the package locally using:

pip install flow_panel

Usage

Here’s a basic example of how to use the FlowPanel class:

import time
from flow_panel import FlowPanel


def example_run_function(panel: FlowPanel):
    panel.update_progress(0, 10)
    for i in range(10):
        if panel.should_stop or panel.stop_event.is_set():
            panel.append_message("Process stopped by user.")
            break
        time.sleep(1)
        panel.update_progress(i + 1, 10)
        panel.append_message(f"Step pass {i + 1} completed.")
    if not panel.should_stop:
        panel.append_message("Process finished.")


if __name__ == "__main__":
    gui = FlowPanel(
        title_short="Test Panel",
        title_long="Test Panel GUI",
        list_descriptions=["Run a test process", "with multiple steps."],
        list_user_entries=[
            ["Input 1", "entry", True, None],
            ["Input 2", "combobox", False, ["Option 1", "Option 2"]],
            ["Input 3", "checkbox", False, None],
        ],
        run_function=example_run_function,
        help="This is an example help text."
    )
    gui.mainloop()

Parameters

  • title_short (str): Short title for the window.
  • title_long (str): Longer, descriptive title for the window.
  • list_descriptions (list): List of descriptions to display on the panel.
  • list_user_entries (list): List of user input fields. Each entry is a list containing:
    • Description label
    • Input type (entry, combobox, checkbox, multiple choice)
    • Whether the input is required
    • Options for the input field, if applicable
  • run_function (callable): Function to execute when the "Start" button is pressed.
  • help (str, optional): Help text or URL to open for assistance.

Methods

  • update_progress(value: int, max_value: int): Updates the progress bar.
  • append_message(message: str, color_code: Dict[str,str], error_tracking: bool): Appends a message to the text area with color based on the message type.
  • prompt_to_proceed(): Prompts the user to proceed to the next step.

Contributing

If you’d like to contribute, please fork the repository and submit a pull request with your changes. Make sure to include tests for new features.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for flow-panel 0.0.3

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

Source distribution (sdist)

Source distribution for flow-panel 0.0.3
File Size Uploaded Provenance Actions
flow_panel-0.0.3.tar.gz 5.7 kB Without provenance Details for flow_panel-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flow-panel 0.0.3
File Interpreter ABI Platform Actions
flow_panel-0.0.3-py3-none-any.whl Python 3 none any Details for flow_panel-0.0.3-py3-none-any.whl

Total release size: 11.8 kB

Release files / flow_panel-0.0.3.tar.gz

Download URL flow_panel-0.0.3.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c147609e16871442321bf06ddf45804a5cfb7d9f52775188997a51c8cf33234a
BLAKE2b-256 checksum
How to use checksums
456419d7c86e858c623100a07bdad6b6919c9b2019bffd70946bd9d107dcd390
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / flow_panel-0.0.3-py3-none-any.whl

Download URL flow_panel-0.0.3-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
413486c5feabdbe8c8f39ee71e2c9261e9977b2c0e6566a1ed8ac203bae515a6
BLAKE2b-256 checksum
How to use checksums
b205656299235475443c38c7643730de5273b129c0d4222944483d9c5ef2e2bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Security for flow-panel 0.0.3

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

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