Streamlit¶
Full Streamlit integration. Tough-points are utility functions. It is likely this will adapt/change over time, so it is only recommended to use this for debugging/developing.
Install with pypi:
pip install burr[streamlit]
- class burr.integrations.streamlit.AppState(
- display_index: int | None,
- history: list[burr.integrations.streamlit.Record],
- app: Application,
- num_prior_nodes: int = 5,
- burr.integrations.streamlit.load_state_from_log_file(
- jsonl_log_file: str,
- app: Application,
Initializes the state from a log file. This must have been logged using StateAndResultFullLogger. Note that, currently, you must pass in an Application object (although that will be optoinal in the future).
- Parameters:
jsonl_log_file – Log file to load
app – Application object
- Returns:
AppState
- burr.integrations.streamlit.get_state()¶
- burr.integrations.streamlit.render_state_machine(state: AppState)¶
- Visualization of the current state machine. Highlights:
Current node in blue (with white backgorund)
Prior nodes in progressively lighter shades of blue
Use this individually, or within the “render_explorer” view
- Parameters:
state
- Returns:
- burr.integrations.streamlit.render_action(state: AppState)¶
Renders the current action, including the reads, writes, and the code for the action. With Hamilton actions, it will also show the visualization of the action.
This can be used individually (with a state object) or within the “render_explorer” view.
- Parameters:
state
- Returns:
- burr.integrations.streamlit.render_state_results(state: AppState)¶
Render the state and results for the current state. This includes the state and the result of the action. This can be used individually (with a state object) or within the “render_explorer” view.
- Parameters:
state – State object
- Returns:
None
- burr.integrations.streamlit.set_slider_to_current()¶