Learn Python with Talk Python's 270 hours of courses

Realtime Web Apps and Dashboards with H2O Wave

Episode #386, published Wed, Oct 19, 2022, recorded Mon, Oct 3, 2022

Python's data science and data visualization capabilities are certainly one of the reasons for Python's meteoric rise over the past 10 years. But often thens visuals have been corralled into notebooks used by data scientists themselves or into static web pages. Recently, a host of excellent dashboard build and hosting frameworks have come along to turn these visuals into interactive apps for everyone. On this episode, we'll talk about H20 Wave. One of these excellent dashboard frameworks. We have Martin Turoci from H2O.ai here to tell us about Wave.

Watch this episode on YouTube
Play on YouTube
Watch the live stream version

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. “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.
  10. 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.

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:

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

Martin Turóci on Twitter: @unusual_code
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

Talk Python's Mastodon Michael Kennedy's Mastodon