ovo.app.components.custom_elements

Module Contents

Functions

heading_with_value

Heading with additional text in grey

subheading_with_value

iter_progress

Tqdm-like wrapper that iterates over an iterable and shows a streamlit progress bar

get_approx_screen_width

approx_max_width

wrapped_columns

Create n columns, wrapping them every wrap columns. Each row will always have wrap columns

confirm_download_button

highlight_query

Highlight all occurrences of query in text with :primary-background[query]

refresh_button

simple_tabs

Simplified tabs that return the selected tab label, and persist the selected tab in the URL query params under the given key

API

ovo.app.components.custom_elements.heading_with_value(heading: str, secondary_text: str, level: int = 2, font_weight: int = 800)

Heading with additional text in grey

ovo.app.components.custom_elements.subheading_with_value(heading: str, secondary_text: str, level: int = 3, font_weight: int = 600)
ovo.app.components.custom_elements.iter_progress(iterable: Iterable, text=None, total=None, **kwargs)

Tqdm-like wrapper that iterates over an iterable and shows a streamlit progress bar

ovo.app.components.custom_elements.get_approx_screen_width()
ovo.app.components.custom_elements.approx_max_width(max_width, center=False)
ovo.app.components.custom_elements.wrapped_columns(n: int, wrap=4, divider=False, **kwargs) list[streamlit.delta_generator.DeltaGenerator]

Create n columns, wrapping them every wrap columns. Each row will always have wrap columns

Returns:

flat list of n columns

ovo.app.components.custom_elements.confirm_download_button(data, **kwargs)
ovo.app.components.custom_elements.highlight_query(text: str, query: str) str

Highlight all occurrences of query in text with :primary-background[query]

ovo.app.components.custom_elements.refresh_button(key: str, text='Refresh')
ovo.app.components.custom_elements.simple_tabs(names: list[str], key: str) str

Simplified tabs that return the selected tab label, and persist the selected tab in the URL query params under the given key

The tab container is actually unused in this case - we show the content below the tabs, since it seems to be smoother when switching tabs.

Parameters:
  • names – list of tab names/labels

  • key – query param key to persist selected tab :return name of selected tab