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.3.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.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lb_auto_tk-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 202b94d44ea4ccdd8852ad6756ebacff9891f1e806f0e0e4af1c9fcf69e5dcb9
MD5 353e509b0739382b7b6ea0c549a84644
BLAKE2b-256 2786e8b1d1ee474cb96a099793678b4b7c44d1c22701009f7b0508571fae57c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lb_auto_tk-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e39023cb50f6acfab93c53ff8857cebff2b762029fff63e126d6aa386b26b214
MD5 6d68f9bfcd3c3d7540da4309292c55db
BLAKE2b-256 f532fcb7378a382eb634ac7da65bf8388e90c74cf18d8c1f5c7882d40e78d6a6

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