ruins.core.config
#
Module Contents#
Classes#
Streamlit app Config object. |
Attributes#
- ruins.core.config.session_state#
- class ruins.core.config.Config(path: str = None, **kwargs)#
Bases:
collections.abc.Mapping
Streamlit app Config object.
This class holds all configs needed to run the apps. It can be instantiated just like this to load default values. If a path is provided, it will load the configs from the referenced json file. Any config can be updated by passed kwargs.
This design makes the config updateable and easy to to manage. At the same time it can be persisted to the disk and even mirrored to a database if needed in the future.
- property debug#
- property story_mode#
- get_control_policy(control_name: str) str #
Get the control policy for the given control name.
- allowed policies are:
show: always show the control on the main container
hide: hide the control on the main container, but move to the expander
ignore: don’t show anything
- __iter__()#