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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lb_auto_tk-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 3d5de0fe86894835ae81d9fb90f89bf5db6900f49eb602d63ea93730b2e12233
MD5 92b901a7882b7f40323ce84642a8b16d
BLAKE2b-256 3c2dbf1248b9f59a3fc42d4e494d982440757ca78029484680a3ecd154421126

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lb_auto_tk-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a382ede66fd1eac72a8a0499f13ac01b77057d0561f0f4b63eda239973cbd641
MD5 7db4688036cb86686077fc939f022dc2
BLAKE2b-256 34f0ba0c0d059cd882c152d9c93131d32dc75f98d117e5c7c467093b5525a676

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