StateBar#
Overview#
Statebar is a custom widget to provide easy to use state bars in the pysepal framework. it inherits from the SepalWidget class.
any argument from the original SystemBar ipyvuetify class can be used to complement it.
from pysepal import sepalwidgets as sw
# correct colors for the documentation
# set to dark in SEPAL by default
import ipyvuetify as v
v.theme.dark = False
statebar = sw.StateBar()
statebar
/home/docs/checkouts/pysepal/envs/latest/lib/python3.10/site-packages/google/api_core/_python_version_support.py:212: FutureWarning: You are using a non-supported Python version (3.10.20). Google will not post any further updates to google.api_core supporting this Python version. Please upgrade to the latest Python version, or at least Python 3.11, and then update google.api_core. warnings.warn(message, FutureWarning)
Methods#
State bar can be stopped using the following code. The msg can be changed according to your need.
Tip
You can also change the message without stopping the loading by omitting the second parameter
from pysepal import sepalwidgets as sw
# correct colors for the documentation
# set to dark in SEPAL by default
import ipyvuetify as v
v.theme.dark = False
statebar = sw.StateBar()
statebar.add_msg('ongoing', True)
Note
More information can be found here.