Technology
EZInput gives one API for building scientific user interfaces that runs unchanged in Jupyter notebooks and in terminal scripts.
Documentation | GitHub | PyPI
The problem it solves
Scientific workflows usually have to run in two places: a Jupyter notebook for exploration, and a terminal script in an automated pipeline. That normally means two interface codebases, ipywidgets for the notebook and argparse or prompt-toolkit for the terminal. EZInput removes the duplication.
Features
- One API: the same widget code runs in a notebook and in a terminal without modification
- Persistence: widget values are saved and restored between sessions, so parameter sets survive a restart
- Typed inputs: validation and type checking for integers, floats, text, file paths and more
- Widget set: sliders, dropdowns, text inputs, file pickers and checkboxes, each aware of its environment
- No boilerplate: EZInput detects the environment itself
Who it is for
- Image analysis pipelines with parameters the user sets
- Data science workflows configured interactively
- Research tools that need both a notebook and a command-line interface
- Teaching and tutorials where parameter sets must be reproducible
Installation
pip install ezinput
Example
from ezinput import EZInput
ui = EZInput()
threshold = ui.slider("Threshold", min=0, max=255, value=128)
input_path = ui.file_picker("Input image")
ui.show()
# Works identically in notebooks and terminal scripts
print(f"Processing {input_path} with threshold {threshold}")
Use with NanoPyx
EZInput was written alongside NanoPyx to give its image analysis workflows a consistent interface, so the same notebook can run as an automated pipeline script without changes.
Publications featuring EZInput
|
VLab4Mic: prediction of structural resolvability in super-resolution microscopy Damián Martínez, Bruno M. Saraiva, Tayla Shakespeare, Mark Bates, Dylan M. Owen, Christophe Leterrier, Mario Del Rosario, Ricardo Henriques Preprint published in bioRxiv, June 2026 Technologies: EZInput (), mAIcrobe (), nano-org, NanoJ (), NanoJ-SQUIRREL (), Nuclear-Pores as references and ZeroCostDL4Mic () Funded by: Chan Zuckerberg Initiative (CZI), The Kavli Foundation, and The Wellcome Trust, CZI, EMBO, ERC, H2022 and La Caixa Foundation DOI: 10.64898/2026.06.02.729521 |
|