Skip to main content

A not-so professional dark-mode GUI framework for quick application building

Project description

lb-auto-tk: lib for lazy

© Copyright logic-break 2026 https://logic-break.github.io

lib made for lazy, by lazy

installation:

pip install lb_auto_tk

Usage:

1. Main Application Class

  • LbAutoTk(title="App")

    • title: The text displayed on the window title bar.

2. UI Components (Core Methods)

  • header(text)

    • text: Large, bold display text used as a section title inside the UI.
  • input(label, f_type="any")

    • label: The caption text above the input field.

    • f_type: Validation type. Options: "any", "float" (numbers/decimals only), "no digits" (blocks numbers).

  • button(text, func, type="primary")

    • text: Label on the button.

    • func: The function to execute when clicked.

    • type: Styling choice. "primary" (Accent Blue) or "secondary" (Dark Gray).

  • dropdown(label, options, callback)

    • label: The caption above the selection menu.

    • options: A list of strings, e.g., ["High", "Medium", "Low"].

    • callback: Function that runs immediately when a value is selected.

  • slider(label, start, end, step=1, callback=None)

    • label: The name of the setting.

    • start / end: Range values (min/max).

    • step: The increment value (e.g., 1 or 0.5).

    • callback: Function that runs while the slider is moving.

  • radio(label, options)

    • label: Title of the radio group.

    • options: List of strings for the selectable options.

  • listbox(label, height=6)

    • label: Title for the log/history window.

    • height: How many lines high the box should be.


3. Widget Methods (Interaction)

  • For Input:

    • .get(): Returns the current string typed in the field.

    • .clear(): Erases all text from the field.

  • For Dropdown:

    • .get(): Returns the currently selected option string.
  • For Listbox:

    • .add(text): Pushes a new line to the top of the box (adds > prefix automatically).

    • .clear(): Deletes all entries in the log.

  • For Radio:

    • .var.get(): Retrieves the string value of the selected radio button.
  • For Slider:

    • .info.cget("text"): Useful for grabbing the formatted "Label: Value" string from the UI.

4. Execution

  • app.run()

    • Starts the Tkinter main loop to display your window.

Example:

from lb_auto_tk import LbAutoTk

# 1. Setup App
app = LbAutoTk("AI Image Studio")
app.header("Image Generator")

# 2. Text Inputs
prompt = app.input("Prompt", f_type="any")
negative = app.input("Negative Prompt", f_type="any")

# 3. Dropdown (Model Selection)
def on_model_change(val):
    status.add(f"Switched to model: {val}")
model = app.dropdown("AI Model", ["Stable Diffusion v2.1", "Midjourney v6", "DALL-E 3"], on_model_change)

# 4. Radio Buttons (Aspect Ratio)
ratio = app.radio("Aspect Ratio", ["1:1", "16:9", "9:16"])

# 5. Slider (Sampling Steps)
steps = app.slider("Sampling Steps", 10, 100, 1)

# 6. Listbox (System Logs)
status = app.listbox("System Status", height=5)

# 7. Interaction Logic
def generate():
    p = prompt.get()
    m = model.get()
    r = ratio.var.get()
    s = steps.info.cget("text") # Get value from slider label
    
    if not p:
        status.add("ERROR: Prompt is empty!")
        return
        
    status.add(f"Generating '{p}'...")
    status.add(f"Config: {m} | Ratio: {r} | {s}")

# 8. Buttons
app.button("GENERATE IMAGE", generate)
app.button("CLEAR LOGS", lambda: status.clear(), type="secondary")

app.run()

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

lb_auto_tk-0.0.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

lb_auto_tk-0.0.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file lb_auto_tk-0.0.2.tar.gz.

File metadata

  • Download URL: lb_auto_tk-0.0.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for lb_auto_tk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fdbb7b7e1f792d0cdc7f513fb80e1ebcd9157759c064b99d8b83800add2da841
MD5 86b7d65483e1a95b296863479d5ce39c
BLAKE2b-256 1e8a973c8919b1f0f0a07fe96db7d75e8895f0c874152bd5957750771add61d2

See more details on using hashes here.

File details

Details for the file lb_auto_tk-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: lb_auto_tk-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for lb_auto_tk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18a192e21775562265cc5cffeeb00e2245cd70708fce33998b4d90b9f0fccd77
MD5 c5ea64c40c444a03b74adb5a7597ee26
BLAKE2b-256 da24324b7392cdc4cbd9c7839f33a8b12dd0d8e469794f4142b7ddb283191dc3

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