Skip to main content

iterlab

And Now for Something Completely Different - A different Python paradigm that is.

You are a scientist, not a software developer.

Research runs in a loop: load the data, plot it, change something, plot it again. An interface ought to make that loop faster, but building one usually costs more than it saves, so the parameters end up hard-coded and the loop turns into edit the file, restart, wait for the data to load again.

iterlab stops the interface and the code competing for your time and has them feed each other instead. The interface is drawn, not programmed, so a box you drag onto the canvas is a parameter you can turn while the program runs. The code is live, so a function you rewrite takes effect in the window already open in front of you. Python never restarts — your data stays loaded, your plots stay drawn, and you carry on from exactly where you were.

The same interface running, being drawn in the editor, and the code behind it - each one changing the others

What this means in practice

  • Layout is drawn, never programmed. Drag, drop, resize. No GUI code, ever.
  • Add code? Change layout? No problem! — We know science is iterative and constantly changes. Start with one plot and go from there. The magic happens because we create two separate files, demo.py for your algorithm and demo_layout.py for what you drew. Rearranging the interface cannot disturb your code, and editing your code cannot disturb the interface. The only link between them is an element's tag.
  • No need to re-run the script when you change code! Yes you heard correctly, change your algorithm, add axis labels, no need to re-run the app, no need to reload from scratch! Save hours and hours without losing anything already in memory — loaded data, computed results, and plots already drawn all survive.
  • Made a bug? Just fix it without re-running heavy code. Code bugs and typos are part of life, that doesn’t mean you should waste time re-running heavy code. Everything survives and stays in memory until you fix the code and continue from where you left off. Restarting is the cost the tool exists to remove.

Usage

pip install iterlab
iterlab demo

One command. A new interface opens in editor mode: a blank canvas, a palette of element types, and a properties panel. Drag out an axes and a button, tag them, then click the toggle in the top-left corner to switch to GUI mode and use what you drew.

demo.py is yours. iterlab appends a handler stub for the elements that need one, and never touches anything else. Assume an axes tagged spectrum and a button tagged run_fit:

import numpy as np

def on_startup(ev):
    ev.x = np.linspace(0, 10, 500)      # loaded once per session, accessible from anywhere in your code
    ev.spectrum.plot(ev.x, np.sin(ev.x))

def on_clicked_run_fit(ev, event):
    ev.spectrum.clear()
    ev.spectrum.plot(ev.x, np.sin(2 * ev.x))

Edit that file while the window is open, click the button, and the new code runs — no restart, and ev.x is never reloaded. Make a typo and the session survives, tells you what broke, and lets you fix it and carry on.

ev is yours to fill: anything you assign to it lives for the session. Each element is reachable on it under the tag you gave it in the designer, and an axes is a matplotlib Axes — not a wrapper around one — so every call you already know works, and any library taking an ax= argument accepts it.

On Linux, tkinter is packaged separately: apt install python3-tk or dnf install python3-tkinter.

New here? GUIDE.md walks through installing, drawing your first interface, and the code API for every element.

Status

Early, and honest about it. The end-to-end loop is implemented and tested, with seven element types: axes, button, label, text box, number box, file selector, folder selector. Checkboxes, radio buttons, dropdowns, lists and sliders are next.

Built on

Tk and matplotlib, both used deliberately: Tk for every control, matplotlib for plots only. Built on the basis of my old project "rrGUI" that was never fully functional so it stayed private, and reimplemented using the remarkable framework Spec Kit and Claude.

License

Apache License 2.0. You may use, modify, and redistribute this code, including in closed-source and commercial work. If you do, you must retain the copyright notice, the license, and the NOTICE file, and state which files you changed.

Metadata

Release files for iterlab 2.0.0

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

Source distribution (sdist)

Source distribution for iterlab 2.0.0
File Size Uploaded Provenance
iterlab-2.0.0.tar.gz 560.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for iterlab 2.0.0
File Interpreter ABI Platform
iterlab-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 771.2 kB

Release files / iterlab-2.0.0.tar.gz

Download URL iterlab-2.0.0.tar.gz
Size 560.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9dd20358eebe3417bac3763afde443d0ddd395ddd9c4075558c9da8936fa2e9f
BLAKE2b-256 checksum
How to use checksums
4956cd60acdb8af4dcacdcc83b16a1d41108ccc3f931f48f82eb5b2c693578aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / iterlab-2.0.0-py3-none-any.whl

Download URL iterlab-2.0.0-py3-none-any.whl
Size 210.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e4520165b6a79b1fd5d04dca18747bced9e92e50b847801acca0f7b0402a460
BLAKE2b-256 checksum
How to use checksums
299420be5fcf6fa8c2fc62aa20a694200472aeef2dcc2de66e8eb261cbfc04cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for iterlab 2.0.0

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.

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