dcc.Interval is a component that will fire a callback periodically.
Use dcc.Interval to update your app in realtime without needing to
refresh the page or click on any buttons.

See also the live updates
chapter for other examples and strategies.

dcc.Interval Properties

Access this documentation in your Python terminal with:


Our recommended IDE for writing Dash apps is Dash Enterprise’s
Data Science Workspaces,
which has typeahead support for Dash Component Properties.
Find out if your company is using
Dash Enterprise

id (string; optional):
The ID of this component, used to identify dash components in
callbacks. The ID needs to be unique across all of the components
in an app.

disabled (boolean; optional):
If True, the counter will no longer update.

interval (number; default 1000):
This component will increment the counter n_intervals every
interval milliseconds.

max_intervals (number; default -1):
Number of times the interval will be fired. If -1, then the
interval has no limit (the default) and if 0 then the interval
stops running.

n_intervals (number; default 0):
Number of times the interval has passed.