Skip to main content


Set the H2O_WAVE_CHECKPOINT_DIR environment variable to enable saving and reloading application and session state. For example, run using $ H2O_WAVE_CHECKPOINT_DIR=./temp wave run examples.checkpoint. You will observe that every time you stop and restart the application, the counts are preserved.

from h2o_wave import main, app, Q, ui

async def serve(q: Q):
if q.args.increment_app: = ( or 0) + 1
elif q.args.increment_user:
q.user.count = (q.user.count or 0) + 1
elif q.args.increment_client:
q.client.count = (q.client.count or 0) + 1['example'] = ui.form_card(box='1 1 12 10', items=[
ui.button(name='increment_app', label=f'App Count={ or 0}'),
ui.button(name='increment_user', label=f'User Count={q.user.count or 0}'),
ui.button(name='increment_client', label=f'Client Count={q.client.count or 0}'),


Tags:  checkpoint