H2O Wave

1.8.4 · active · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

from h2o_wave import Q, app, ui, main

@app('/')
async def serve(q: Q):
    q.page['hello'] = ui.markdown_card(
        box='1 1 2 2',
        title='Hello World!',
        content='This is a simple H2O Wave app.'
    )
    await q.page.save()

# To run this app, save it as `app.py` and execute `wave run app.py` in your terminal.
# Then, navigate to http://localhost:10101 in your browser.

view raw JSON →