EZInput: A Cross-Environment Python Library for Easy UI Generation in Scientific Computing
Bruno M. Saraiva, Iván Hidalgo-Cenalmor, António D. Brito, Damián Martínez, Tayla Shakespeare, Guillaume Jacquemet, Ricardo Henriques
TL;DR
EZInput tackles the barrier of algorithm usability in scientific computing by providing a cross-runtime, declarative UI generation library. It automatically renders consistent parameter interfaces across Jupyter notebooks and terminal environments, while persisting user configurations in YAML to enhance reproducibility. The approach combines environment-aware backends (ipywidgets and prompt_toolkit) with a three-layer architecture and per-parameter persistence controls, enabling rapid iteration from notebook exploration to HPC deployment. By integrating with projects like NanoPyx and ColabFold and releasing under MIT, EZInput aims to democratize access to sophisticated computational tools without sacrificing flexibility or reproducibility.
Abstract
Researchers face a persistent barrier when applying computational algorithms with parameter configuration typically demanding programming skills, interfaces differing across environments, and settings rarely persisting between sessions. This fragmentation forces repetitive input, slows iterative exploration, and undermines reproducibility because parameter choices are difficult to record, share, and reuse. We present EZInput, a cross-runtime environment Python library enabling algorithm developers to automatically generate graphical user interfaces that make their computational tools accessible to end-users without programming expertise. EZInput employs a declarative specification system where developers define input requirements and validation constraints once; the library then handles environment detection, interface rendering, parameter validation, and session persistence across Jupyter notebooks, Google Colab, and terminal environments. This "write once, run anywhere" architecture enables researchers to prototype in notebooks and deploy identical parameter configurations for batch execution on remote systems without code changes or manual transcription. Parameter persistence, inspired by ImageJ/FIJI and adapted to Python workflows, saves and restores user configurations via lightweight YAML files, eliminating redundant input and producing shareable records that enhance reproducibility. EZInput supports diverse input types essential for scientific computing and it also includes built-in validation that ensures data integrity and clear feedback that reduces user friction.
