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

NOTE: in code, you must import 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.6.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.6-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lb_auto_tk-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 38cc1f4ed7c6532ab18ff660ef2bb37f54950de6ef537ba335aed0d52e5c8419
MD5 0875981e1970cb733aa09825ec7e78b5
BLAKE2b-256 f40ed49739bb95a8a84c59e6f18520ccf968202c0a268a2f64ced950075c34f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lb_auto_tk-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 90d532bfb1d9b23fc21cfc8dbb3372d1276df466938e74c15b09c1d23bf55740
MD5 3ec5257c21fe46a9202723284a71dae4
BLAKE2b-256 5197280e99aaedac349b71eeee90535c6f3edcdb08ce191ca8150c8c30c5942f

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