annie.desktop

Annie as a Windows desktop app: the server plus a notification-area (tray) icon.

The Windows launcher (installer/windows/launcher.pyw) starts pythonw -m annie.desktop, so there is no console window. Instead, the Annie icon sits in the notification area at the bottom right of the taskbar, and its menu opens Annie in the browser, opens the Annie folder, downloads the example datasets when they were not installed, checks for updates, and quits Annie.

The tray runs on its own thread (pystray’s run_detached) and the NiceGUI server keeps the main thread, exactly as with annie on the command line. Everything else is the regular app: annie.app.main() is called unchanged.

Run python -m annie.desktop on another platform, or without the desktop extra, and it starts Annie without the tray.

Classes

Tray

The notification-area icon and its menu, for the lifetime of the server.

Functions

main(→ None)

Start Annie with its tray icon (Windows), or plainly where there is no tray.

Module Contents

class annie.desktop.Tray(url: str, version: str, install_dir: pathlib.Path | None)[source]

The notification-area icon and its menu, for the lifetime of the server.

start() → None[source]

Show the icon; the menu works as soon as it appears.

stop() → None[source]

Remove the icon (Windows otherwise leaves a ghost until hovered).

annie.desktop.main() → None[source]

Start Annie with its tray icon (Windows), or plainly where there is no tray.