H2O Wave is a lightweight software stack for building beautiful, low-latency, real-time, browser-based applications and dashboards entirely in Python, without requiring HTML, Javascript, or CSS expertise. It excels at capturing data, visualizations, and graphics from multiple sources and broadcasting them live over the web. The current version is 1.8.4, with frequent releases often including security updates.
pip install h2o-waveVerified import paths — ran on the pinned version, not inferred.
This 'Hello World' example demonstrates a basic Wave application. It defines a single page with a Markdown card displaying a title and content. The `@app('/')` decorator registers the `serve` function to handle requests at the root URL. The `Q` object provides access to the current page and other context. `ui` is used to create UI components. Finally, `await q.page.save()` sends the page updates to the browser.
Review the official Wave 1.0 changelog and update routing logic, preferably adopting the `handle_on` mechanism for reliable event handling.
Ensure `waved` (the Go-based Wave server) is running and accessible to your Python Wave app, usually via `H2O_WAVE_ADDRESS` environment variable if on separate machines or containers.
Understand and correctly apply state scopes: `q.app` for global application state, `q.user` for per-user state across all their sessions, and `q.client` for per-browser-tab state.
Always ensure your app handler explicitly updates at least one UI element, even a non-existent one (`q.page['non-existent'].items = []`), or provide user feedback, to clear the loading spinner.
For production, ensure proper TLS certificates are configured and verified for all communication, and do not disable TLS verification.
Start the `waved` server separately. If running on different hosts or non-default ports, configure the Wave app with `H2O_WAVE_ADDRESS` environment variable to point to the correct `waved` address, e.g., `H2O_WAVE_ADDRESS='http://your-waved-host:10101'`.
Even if no visual change is intended, explicitly update a UI component or a dummy card within your handler (e.g., `q.page['feedback_card'] = ui.message_bar(type='info', text='Action complete!')` or `q.page['temp'].items = []`) before `await q.page.save()`.
Navigate to `/Applications/Python X.Y` (where X.Y is your Python version) and execute the `Install Certificates.command` script. This updates the certificate store.
No dependency data recorded yet.