Skip to main content

flimkit-web-ui

A browser front end for FLIMKit. Start FLIMKit, open http://127.0.0.1:8766, and every desktop mode is there in a web page: Single FOV, Tile Stitch, Phasor, Batch and the Machine IRF builder, plus the project browser, synthetic data generator, preferences and plugin manager.

It is an add-on, not a second copy of the app. The page drives the desktop window's own form variables and presses its own buttons, so a fit started from the browser runs through exactly the same code path as one started from the desktop, and the two stay in sync.

Install

pip install flimkit-web-ui

Install it into the same Python environment FLIMKit runs from. FLIMKit finds it through the flimkit.plugins entry point, so there is nothing else to wire up. On the next start the server comes up automatically and Tools > Open Web UI opens it in your browser.

Verify the install with:

python -c "import flimkit_web_ui; print('ok')"

Tested with FLIMKit 0.13.4.

What is in the page

Tab What you can do
Single FOV Pick a file or z-stack, all eight IRF methods, fit model and components, fit window, masking, pile-up and background correction, run and cancel the fit. The live preview shows intensity, lifetime, decay and residuals, with the colour scale, view and τ weighting controls and the z-slider.
ROI analysis Draw rectangle, ellipse, polygon and freehand regions straight onto the preview, rename, delete, import and export GeoJSON and CSV, and fit an ROI decay with the fit plot and table shown in the page.
Tile Stitch All four pipelines (stitch only, stitch and fit, per-tile fit, multidimensional series), per-pixel map exports, tile registration and per-tile IRFs.
Phasor Load a PTU or resume a session, click the phasor plot to place cursors, drag them, polygon cursors, radius and ratio, phasor filters, Find Peaks (with one-click cursors on each peak), FRET trajectory and donor FRET fit, cursor-gated decay fit, save the session.
Batch Multi-tile ROI, single FOV and timelapse batches, with every export option and the timelapse reference lifetimes.
Machine IRF Build a machine IRF from PTU and XLSX pairs and see the result plotted.
Results The run log, fit summary table and CSV, image export (PNG, OME-TIFF, OME-Zarr), the output image browser, session save and restore, and expert settings.
Tools Project folder browser and recent files, synthetic PTU generator, preferences, plugins, about, update check and error logs.

Files are chosen with a file browser in the page, which lists folders on the machine FLIMKit is running on. Anything the desktop would offer as a save dialog is either written to the path you give or downloaded by the browser.

How it behaves

  • One app, shared state. There is one FLIMKit window behind the page. Several tabs or people can open it, but they all control the same form and the same results, and the last edit wins. Only one fit runs at a time.
  • Dialogs move to the page while you use it. While a web page is open and has been used in the last 30 minutes, FLIMKit's desktop pop-ups (errors, warnings, "missing input", channel and frequency prompts) appear as notices in the page instead of blocking the desktop. Close the tab and the desktop behaves normally again.
  • Progress windows still appear on the desktop. The page mirrors their progress and can cancel them.

Security

By default the server listens on 127.0.0.1 only and has no password. Anyone who can reach it can browse your files and run FLIMKit, so set a password before exposing it to any network.

The address is read from the plugin:web_ui section of ~/.flimkit/config.json:

{
  "plugin:web_ui": {
    "host": "127.0.0.1",
    "port": 8766
  }
}

Port 8765 belongs to the FLIMKit bridge, so the web UI defaults to 8766. If that is taken it moves to a free port and prints it in FLIMKit's log, and Tools > Open Web UI opens wherever it ended up. A port set here or in FLIMKIT_WEB_PORT is used as given, and a clash there is an error rather than a quiet move.

Running without a desktop (Docker, servers)

FLIMKit still needs an X display to start its Tk window, so run it under a virtual display such as Xvfb, and configure the web UI with environment variables. These override the config file.

Variable Effect
FLIMKIT_WEB_HOST Address to listen on, for example 0.0.0.0 inside a container
FLIMKIT_WEB_PORT Port to listen on
FLIMKIT_WEB_PASSWORD Require HTTP Basic authentication for every page and API call
FLIMKIT_WEB_USER The user name for that login, flimkit by default
FLIMKIT_WEB_HEADLESS Set to 1 when nobody can see the desktop, so every FLIMKit dialog goes to the web page instead of waiting on an invisible window

GET /healthz answers ok without a password once the server is up, for container health checks.

The FLIMKit Docker images are set up this way.

Working on it

pip install --no-deps 'flimkit @ git+https://github.com/FLIMKit/FLIMKit'
pip install -e '.[test]'
pytest -q

The tests are headless: they check the plugin registers, the dialog and threading bridge, the API helpers and the HTTP server against a stand-in app, so they need no display and no FLIMKit scientific stack.

File What it does
flimkit_web_ui/__init__.py Registers the startup hook that starts the server and the Tools > Open Web UI entry
flimkit_web_ui/server.py The HTTP server and its routes
flimkit_web_ui/bridge.py Runs calls on the Tk thread, routes desktop dialogs to the page, tracks progress windows and renders the desktop's figures
flimkit_web_ui/api.py Form fields, app state, Single FOV, ROIs, results and expert settings
flimkit_web_ui/api_modes.py Tile Stitch, Batch, Machine IRF, Phasor, projects and the tools menu
flimkit_web_ui/page.html, core.js, fov.js, modes.js The page

Releasing

Push a tag like v0.1.0. The publish workflow builds the package and uploads it to PyPI through trusted publishing, and the release workflow attaches the wheel and sdist to a GitHub release.

Licence

MIT, same as FLIMKit.

Release files for flimkit-web-ui 0.1.1

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

Source distribution (sdist)

Source distribution for flimkit-web-ui 0.1.1
File Size Uploaded
flimkit_web_ui-0.1.1.tar.gz 48.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flimkit-web-ui 0.1.1
File Interpreter ABI Platform
flimkit_web_ui-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 93.4 kB

Release files / flimkit_web_ui-0.1.1.tar.gz

Download URL flimkit_web_ui-0.1.1.tar.gz
Size 48.7 kB
Tags Source
SHA-256 checksum
How to use checksums
22c9ae3f81b660b3b340d38e109986bedac6ad447aed7ffe217dbf448fe2146f
BLAKE2b-256 checksum
How to use checksums
ac366458a4d32cb2bb3adc93eed2af8137ddb2d92db64fd4a6a3073babf3a115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / flimkit_web_ui-0.1.1-py3-none-any.whl

Download URL flimkit_web_ui-0.1.1-py3-none-any.whl
Size 44.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd11641cb6bee6be47c890c4d75e94a23474c733a24aaf8d28be2016d62f7b84
BLAKE2b-256 checksum
How to use checksums
016506b79780df676d21d1f0cf354f84b2142bddbd174a8aa7b008f7c33dd995
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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