Realtime Web Apps and Dashboards with H2O Wave
Episode Deep Dive
Guest Introduction and Background
Martin Turoci is part of the H2O.ai team and works on H2O Wave, a Python framework for building real-time web dashboards and applications. He started as a Java developer, pivoted into front-end roles due to demand, and eventually found himself working heavily in Python. Martin’s role involves coding new H2O Wave features, guiding contributors, and engaging with the open-source community to improve this powerful dashboard framework.
What to Know If You're New to Python
If this is your first encounter with real-time dashboards in Python, here are a few points to catch you up:
- Basic Python Skills: You should be comfortable running Python scripts and setting up virtual environments.
- Installing Packages: Tools like
pip
and virtual environments (e.g.,venv
) will help you manage dependencies for frameworks like H2O Wave. - Fundamental Web Concepts: Knowing a bit about HTTP, web servers, and how Python code integrates with browsers will go a long way here.
- Asynchronous Programming: H2O Wave leverages
async
/await
under the hood, so a basic understanding of these features will be helpful.
Key Points and Takeaways
- H2O Wave at a Glance
H2O Wave is a free, open-source framework from H2O.ai enabling developers to build real-time dashboards and web apps using only Python. Rather than juggling HTML, JavaScript, and CSS, Wave lets you write Python code and have it render interactive pages. The result is a streamlined approach that drastically simplifies data scientists’ and Python developers’ workflow for web apps.
- Links / Tools:
- H2O Wave: wave.h2o.ai
- GitHub Repo: github.com/h2oai/wave
- Links / Tools:
- Interactive Dashboards without Front-End Hassle
Many Python-driven dashboards require at least a little JavaScript or front-end framework knowledge. H2O Wave is designed to hide that complexity. You can create modern, data-intensive dashboards with no explicit React or Vue code. This approach is especially appealing to data scientists accustomed to notebooks and wanting minimal front-end overhead.
- Links / Tools:
- Jupyter Notebooks: jupyter.org
- Streamlit: streamlit.io
- Plotly Dash: plotly.com/dash
- Links / Tools:
- Real-Time Updates via WebSockets
Wave’s architecture uses WebSockets for pushing data updates to connected clients. Whenever your Python code changes part of the dashboard state, all active browsers see those changes live. This model is more efficient than manual reload or polling, making dashboards feel more dynamic and responsive.
- Links / Tools:
- AsyncIO (Python standard): docs.python.org/3/library/asyncio.html
- Links / Tools:
- Simplified Two-Part Setup
H2O Wave splits into the Wave server (written in Go) and the Wave app (a Python program). The Wave server handles routing, authentication integration (via OpenID Connect if desired), and real-time communication. Your Python app simply communicates state changes to the Wave server, which then updates all clients.
- Links / Tools:
- OpenID Connect: openid.net/connect
- Links / Tools:
- Elevated Productivity with Python-Only UIs
You manage the UI with Python objects, such as “cards” for markdown text, tables, or filters. This means you can build complex “enterprise-grade” user interfaces in minutes. By removing front-end complexities, data scientists can independently create full-blown apps without a specialized web developer.
- Links / Tools:
- Markdown: commonmark.org
- Links / Tools:
- Comparisons with Streamlit and Plotly Dash
Martin highlighted how H2O Wave was partly motivated by perceived gaps in performance and features from other dashboard frameworks. Streamlit originally spun up a separate process per user session, but more recent versions moved to an AsyncIO design similar to H2O Wave. Meanwhile, Plotly Dash focuses on the data visualization layer, whereas Wave aims to deliver a full “web app” experience with layouts, forms, and more.
- Links / Tools:
- Streamlit: streamlit.io
- Plotly Dash: plotly.com/dash
- Links / Tools:
- Enterprise Security and Deployment
Built-in OpenID Connect support lets you handle identity and authentication more easily than rolling custom solutions. For deployment, you can run Wave on any server or container. If you prefer a managed solution, H2O.ai offers a commercial cloud platform to host your Wave apps, so teams without dedicated ops resources can also benefit.
- Links / Tools:
- H2O.ai Cloud: h2o.ai/platform/cloud
- Links / Tools:
- Toy Apps vs. Production-Ready
H2O Wave scales from “toy apps” for demos and proofs of concept to “production-ready,” enterprise-level solutions. You can start with a small script that just updates a single chart but expand into advanced dashboards featuring interactive filters, authentication, and real-time collaboration—still within Python.
- Links / Tools:
- Sample Projects: github.com/h2oai/wave/tree/master/examples
- Links / Tools:
- “Scripts” vs. “Apps” In Wave, you can choose between a simple Wave script (where you run a short-lived Python process to create a static snapshot) or a Wave app (which stays live, receiving user interactions and pushing back updated states). This pattern lowers the barrier to entry—just pick the approach that suits your dashboard’s interactivity needs.
- Escape Hatches for Full Customization If you need advanced front-end touches or custom JavaScript components, Wave provides ways to embed HTML, CSS, and scripts. This means you’re not locked out of advanced use cases; you just don’t have to start there. The default approach is simpler, but you can still expand to suit unique UI demands.
- Links / Tools:
- Wave documentation: wave.h2o.ai/docs
Interesting Quotes and Stories
- On the “toy apps” concept: Martin explained that many data scientists experiment with small web apps—just simple scripts at first—but are delighted when the same Python code can scale to robust solutions.
- On developer satisfaction: “I kind of enjoy front-end development, so it’s not a pain for me, but Wave is for those who don’t want to manage React or TypeScript,” Martin joked, highlighting the “JavaScript-free” value.
- On deployment: The hackathon story where a user built a complex wildfire prediction interface on Wave in a short time illustrated how quick iteration is possible without sacrificing depth.
Key Definitions and Terms
- Wave Server: The Go-based backend service that manages real-time communications, routing, and optional authentication for H2O Wave apps.
- Wave App: The continuous Python process that handles user interactions, state updates, and passes UI changes to the Wave server.
- Cards: Predefined UI elements in H2O Wave, such as tables, markdown blocks, forms, and more, used for layout and content organization.
- Reactive Programming: A paradigm where data updates automatically propagate through the app, reducing the need to manually manage callbacks.
Learning Resources
If you want to deepen your Python knowledge and sharpen your skills for building or customizing dashboards, here are a few curated suggestions:
-
A comprehensive yet gentle introduction to the Python language, ensuring you have a solid foundation to tackle frameworks like H2O Wave.
HTMX + Flask: Modern Python Web Apps, Hold the JavaScript
A powerful alternative or complement to building interactive front ends, focusing on minimal JavaScript and a Python-centric approach.
Reactive Web Dashboards with Shiny
Learn about another “reactive programming” dashboard tool. While Shiny is primarily known for R, you’ll gain insights applicable to the concept of reactive dashboards in general.
Overall Takeaway
H2O Wave provides a Python-centric path to real-time, dynamic dashboards and web apps—perfect for data scientists and developers who want powerful UI features without heavy front-end coding. With a mix of built-in components, an asynchronous architecture, and easy customization hooks, Wave makes it fast to build interactive projects that can scale from a quick prototype all the way to production. Whether you’re new to Python web frameworks or an experienced developer seeking a more direct approach, H2O Wave is definitely worth a closer look.
Links from the show
H20 Wave: wave.h2o.ai
H20 Wave Source: github.com
H20 Widgets: wave.h2o.ai
Hydrogen Torch: docs.h2o.ai
PyCharm H20 Wave Plugin: plugins.jetbrains.com
Testing with Playright episode: talkpython.fm/368
Hacktoberfest: hacktoberfest.com
Watch this episode on YouTube: youtube.com
Episode transcripts: talkpython.fm
--- Stay in touch with us ---
Subscribe to Talk Python on YouTube: youtube.com
Talk Python on Bluesky: @talkpython.fm at bsky.app
Talk Python on Mastodon: talkpython
Michael on Bluesky: @mkennedy.codes at bsky.app
Michael on Mastodon: mkennedy