streamlit の API リファレンス
streamlit (streamlit/streamlit) の公開 API 400 件 —— クラス 102、関数 198、メソッド 100。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: streamlit/streamlit
| 種別 | 件数 |
|---|---|
| クラス | 102 |
| 関数 | 198 |
| メソッド | 100 |
API 一覧
func
e2e_playwright.load_testing.generate_report.main() -> intMain entry point for the report generator.
func
e2e_playwright.load_testing.metrics_collector.compute_percentile(sorted_values:list[float], percentile:float) -> floatCalculate percentile using linear interpolation.
func
e2e_playwright.load_testing.scenarios.dataframe_app.create_dataframe(rows:int, cols:int) -> pd.DataFrameCreate a large dataframe for testing.
func
e2e_playwright.load_testing.worker.run_worker_session(server_url:str, worker_id:int, scenario:str, timeout_sec:int=120) -> SessionMetricsExecute one user session in a worker process.
func
e2e_playwright.shared.animation_utils.check_if_offscreen(app:Page, img:Locator) -> boolDetermines if an element is rendered but outside the viewport.
func
e2e_playwright.shared.animation_utils.check_if_onscreen(app:Page, img:Locator) -> boolDetermines if an element is visible within the viewport.
func
e2e_playwright.shared.app_target.wait_for_app_target_loaded(app:AppTarget) -> NoneWait for initial app load (works when hosted in an iframe).
func
e2e_playwright.shared.app_target.wait_for_app_target_run(app:AppTarget, *wait_delay:int=100, *initial_wait:int=210) -> NoneWait for the given app target to finish running.
class
e2e_playwright.shared.app_utils.LocatorContextA minimal DOM-query context for Playwright tests.
func
e2e_playwright.shared.app_utils.check_top_level_class(app:Page, test_id:str) -> NoneCheck that the top level class is correctly set.
func
e2e_playwright.shared.app_utils.expand_sidebar(app:Page) -> LocatorExpands the sidebar.
func
e2e_playwright.shared.app_utils.expect_exception(locator:Locator | Page, expected_message:str | re.Pattern[str] | None=None) -> NoneExpect an exception to be displayed in the app.
func
e2e_playwright.shared.app_utils.expect_no_skeletons(locator:Locator | Page | FrameLocator, timeout:int=10000) -> NoneExpect no skeletons to be visible on the page.
func
e2e_playwright.shared.app_utils.expect_warning(locator:Locator | Page, expected_message:str | re.Pattern[str]) -> NoneExpect a warning to be displayed in the app.
func
e2e_playwright.shared.app_utils.fill_number_input(locator:Locator | Page, label:str | re.Pattern[str], value:int) -> NoneSet the value of a number input.
func
e2e_playwright.shared.app_utils.get_button(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a button widget with the given label.
func
e2e_playwright.shared.app_utils.get_button_group(app:Page, key:str) -> LocatorGet a button group with the given key.
func
e2e_playwright.shared.app_utils.get_camera_input(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a camera input with the given label.
func
e2e_playwright.shared.app_utils.get_caption(locator:Locator | Page, text_inside_caption:str | re.Pattern[str]) -> LocatorGet a caption element with the given text inside.
func
e2e_playwright.shared.app_utils.get_chat_input(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a chat input container by its label.
func
e2e_playwright.shared.app_utils.get_checkbox(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a checkbox widget with the given label.
func
e2e_playwright.shared.app_utils.get_color_picker(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a color picker with the given label.
func
e2e_playwright.shared.app_utils.get_date_input(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a date input with the given label.
func
e2e_playwright.shared.app_utils.get_datetime_input(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a datetime input with the given label.
func
e2e_playwright.shared.app_utils.get_element_by_key(locator:Locator | Page, key:str) -> LocatorGet an element with the given user-defined key.
func
e2e_playwright.shared.app_utils.get_expander(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a expander container with the given label.
func
e2e_playwright.shared.app_utils.get_feedback(app:Page, key:str) -> LocatorGet a feedback widget with the given key.
func
e2e_playwright.shared.app_utils.get_form_submit_button(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a form submit button with the given label.
func
e2e_playwright.shared.app_utils.get_heading(locator:Locator | Page, text_inside_heading:str | re.Pattern[str]) -> LocatorGet a heading element with the given text inside.
func
e2e_playwright.shared.app_utils.get_image(locator:Locator | Page, caption:str | re.Pattern[str]) -> LocatorGet an image element with the given caption.
func
e2e_playwright.shared.app_utils.get_markdown(locator:Locator | Page, text_inside_markdown:str | re.Pattern[str]) -> LocatorGet a markdown element with the given text inside.
func
e2e_playwright.shared.app_utils.get_metric(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a metric element with the given label.
func
e2e_playwright.shared.app_utils.get_multiselect(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a multiselect with the given label.
func
e2e_playwright.shared.app_utils.get_number_input(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a number input with the given label.
func
e2e_playwright.shared.app_utils.get_popover(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a popover with the given label.
func
e2e_playwright.shared.app_utils.get_radio(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a radio widget with the given label.
func
e2e_playwright.shared.app_utils.get_radio_option(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a radio button widget with the given label.
func
e2e_playwright.shared.app_utils.get_segment_button(locator:Locator, text:str) -> LocatorGet a segment button with the given button group.
func
e2e_playwright.shared.app_utils.get_selectbox(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a selectbox with the given label.
func
e2e_playwright.shared.app_utils.get_slider(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a slider with the given label.
func
e2e_playwright.shared.app_utils.get_text(locator:Locator | Page, text:str | re.Pattern[str]) -> LocatorGet a text element with the given text.
func
e2e_playwright.shared.app_utils.get_text_area(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a text area with the given label.
func
e2e_playwright.shared.app_utils.get_text_input(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a text input with the given label.
func
e2e_playwright.shared.app_utils.get_time_input(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a time input with the given label.
func
e2e_playwright.shared.app_utils.get_toggle(locator:Locator | Page, label:str | re.Pattern[str]) -> LocatorGet a toggle widget with the given label.
func
e2e_playwright.shared.app_utils.reset_focus(locator:LocatorContext) -> NoneReset the focus of the app.
func
e2e_playwright.shared.app_utils.reset_hovering(locator:LocatorContext) -> NoneReset the hovering of the app.
func
e2e_playwright.shared.app_utils.tab_until_focused(page:Page, locator:Locator, max_tabs:int=50) -> NoneTab through the page until the given locator is focused.
func
e2e_playwright.shared.app_utils.type_time(time_display:Locator, hour:str, minute:str, second:str | None=None) -> NoneType a time into a TimeInput's spinbutton segments.
func
e2e_playwright.shared.dataframe_utils.expect_canvas_to_be_visible(locator:Locator) -> NoneExpect canvas to be visible.
func
e2e_playwright.shared.dataframe_utils.get_open_cell_overlay(page:Page | Locator) -> LocatorGet the currently open cell overlay / editor.
func
e2e_playwright.shared.dataframe_utils.retry_interaction(func:Callable[[], Any], max_attempts:int=3, delay_ms:int=100) -> AnyRetry a potentially flaky interaction.
func
e2e_playwright.shared.dataframe_utils.select_row(dataframe_element:Locator, row_pos:int, column_width:Literal['small', 'medium', 'large']='small') -> NoneSelect the specified row in the dataframe.
func
e2e_playwright.shared.dataframe_utils.unfocus_dataframe(page:Page) -> NoneUnfocus the dataframe.
func
e2e_playwright.shared.git_utils.get_git_root() -> PathGet the root directory of the git repository.
func
e2e_playwright.shared.performance.start_capture_traces(page:Page) -> NoneStart capturing traces using the PerformanceObserver API.
func
e2e_playwright.shared.performance.with_cdp_session(page:Page) -> Generator[CDPSession, None, None]Create a new Chrome DevTools Protocol session.
func
e2e_playwright.shared.pydeck_utils.click_point(click_handling_div:Locator, coords:Position) -> NoneHelper function to click on a point.
func
e2e_playwright.shared.react18_utils.wait_for_react_stability(page:Page, timeout_ms:int=1000) -> NoneWait for React 18 rendering to stabilize.
class
e2e_playwright.shared.stats_reporter.StatsCollectorCollects test statistics during a pytest session.
method
e2e_playwright.shared.stats_reporter.StatsReporterPlugin.pytest_sessionstart(session:pytest.Session) -> NoneCalled at the start of the test session.
class
e2e_playwright.shared.stats_reporter.TestResultHolds the result of a single test.
class
e2e_playwright.shared.stats_reporter.WorkerStatsStatistics for a single xdist worker.
func
e2e_playwright.shared.stats_reporter.pytest_addoption(parser:pytest.Parser) -> NoneRegister command-line options for the stats reporter.
func
e2e_playwright.shared.stats_reporter.pytest_configure(config:Config) -> NoneRegister the stats reporter plugin if not disabled.
func
e2e_playwright.shared.theme_utils.apply_theme_via_window(page:Page, base:str='light', **theme_options:Any) -> NoneApply custom theme via window.__streamlit injection.
func
e2e_playwright.shared.vega_utils.get_vega_graphics_document(chart:Locator) -> LocatorReturn the Vega "graphics-document" element(s) for a chart.
class
e2e_playwright.st_app_advanced.CustomAPIErrorCustom exception for testing exception handlers.
func
e2e_playwright.st_app_advanced.api_data(request:Request) -> JSONResponseReturn test data from a custom API endpoint.
func
e2e_playwright.st_app_advanced.api_error(request:Request) -> JSONResponseRaise a custom exception to test exception handlers.
func
e2e_playwright.st_app_advanced.api_lifespan_check(request:Request) -> JSONResponseReturn lifespan events to verify startup hook was called.
func
e2e_playwright.st_dataframe_config.get_data_uri(file_path:Path, mime_type:str) -> strConvert a file to a base64 data URI.
func
e2e_playwright.st_download_button_deferred.failing_callable() -> strCallable that always raises an error.
func
e2e_playwright.st_download_button_deferred.generate_binary_data() -> bytesGenerate binary data.
func
e2e_playwright.st_download_button_deferred.generate_csv_data() -> strGenerate CSV data when download is clicked.
func
e2e_playwright.st_download_button_deferred.generate_large_data() -> strGenerate a larger dataset.
class
e2e_playwright.st_help.FooWithLongDocsMy docstring.
class
e2e_playwright.st_help.FooWithMixedDocsMy docstring.
method
e2e_playwright.st_help.FooWithMixedDocs.my_func_1(a:int, b:bool=False) -> NoneFunc with doc.
class
e2e_playwright.st_magic.FooClass docstring.
class
e2e_playwright.st_magic.MyClassMyClass: this help block should be printed.
func
e2e_playwright.st_magic.docstrings()Docstring.
func
e2e_playwright.st_magic.nested()Multiline docstring.
class
e2e_playwright.st_multiselect.CustomOptionCustom class without __eq__ implementation.
func
lib.streamlit..agents.skills.developing-with-streamlit.assets.templates.apps.dashboard-compute.streamlit_app.load_region_data() -> pd.DataFrameLoad credits by region.
func
lib.streamlit.auth_util.decode_provider_token(provider_token:str) -> ProviderTokenPayloadDecode the JWT token and validate the claims.
func
lib.streamlit.auth_util.encode_provider_token(provider:str) -> strReturns a signed JWT token with the provider and expiration time.
func
lib.streamlit.auth_util.get_secrets_auth_section() -> AttrDictGet the 'auth' section of the secrets.toml.
func
lib.streamlit.auth_util.is_authlib_installed() -> boolCheck if Authlib is installed.
func
lib.streamlit.cli_util.open_browser(url:str) -> NoneOpen a web browser pointing to a given URL.
func
lib.streamlit.commands.execution_control.rerun(*scope:Literal['app', 'fragment']='app') -> NoReturnRerun the script immediately.
func
lib.streamlit.commands.execution_control.stop() -> NoReturnStops execution immediately.
func
lib.streamlit.commands.navigation.convert_to_streamlit_page(page_input:PageType) -> PageConvert various input types to Page objects.
class
lib.streamlit.components.types.base_component_registry.BaseComponentRegistryInterface for ComponentRegistries.
method
lib.streamlit.components.types.base_component_registry.BaseComponentRegistry.register_component(component:BaseCustomComponent) -> NoneRegister a CustomComponent.
class
lib.streamlit.components.types.base_custom_component.BaseCustomComponentInterface for CustomComponents.
func
lib.streamlit.components.v1.component_arrow.arrow_proto_to_dataframe(proto:ArrowTableProto) -> DataFrameConvert ArrowTable proto to pandas.DataFrame.
func
lib.streamlit.components.v1.component_arrow.marshall(proto:ArrowTableProto, data:Any, default_uuid:str | None=None) -> NoneMarshall data into an ArrowTable proto.
class
lib.streamlit.components.v1.custom_component.CustomComponentA Custom Component declaration.
class
lib.streamlit.components.v2.component_registry.BidiComponentDefinitionDefinition of a bidirectional component V2.
class
lib.streamlit.components.v2.component_registry.BidiComponentRegistryRegistry for bidirectional components V2.
method
lib.streamlit.components.v2.component_registry.BidiComponentRegistry.unregister(name:str) -> NoneRemove a component definition from the registry.
class
lib.streamlit.components.v2.manifest_scanner.ComponentConfigStructured configuration for a single component entry.
method
lib.streamlit.components.v2.manifest_scanner.ComponentConfig.from_dict(config:dict[str, Any]) -> ComponentConfigCreate a ComponentConfig from a raw dict.
class
lib.streamlit.components.v2.manifest_scanner.ComponentManifestParsed component manifest data.
func
lib.streamlit.config.get_config_files(file_name:str) -> list[str]Return the list of config files (e.g.
func
lib.streamlit.config.get_option(key:str) -> AnyReturn the current value of a given Streamlit configuration option.
func
lib.streamlit.config.get_options_for_section(section:str) -> dict[str, Any]Get all of the config options for the given section.
func
lib.streamlit.config.get_where_defined(key:str) -> strIndicate where (e.g.
func
lib.streamlit.config.is_manually_set(option_name:str) -> boolCheck if a given option was actually defined by the user.
func
lib.streamlit.config.process_section(section_path:str, section_data:dict[str, Any]) -> NoneRecursively process nested sections of the config file.
func
lib.streamlit.config.set_option(key:str, value:Any, where_defined:str=_USER_DEFINED) -> NoneSet config option.
func
lib.streamlit.config.set_user_option(key:str, value:Any) -> NoneSet a configuration option.
func
lib.streamlit.config.show_config() -> NonePrint all config options to the terminal.
class
lib.streamlit.config_option.ConfigOptionStores a Streamlit configuration option.
method
lib.streamlit.config_option.ConfigOption.is_expired() -> boolReturns true if expiration_date is in the past.
method
lib.streamlit.config_option.ConfigOption.set_value(value:Any, where_defined:str | None=None) -> NoneSet the value of this option.
method
lib.streamlit.config_option.ConfigOption.value() -> AnyThe value of this config option.
class
lib.streamlit.connections.snowflake_connection.BaseSnowflakeConnectionBase class for Snowflake connections.
method
lib.streamlit.connections.snowflake_connection.BaseSnowflakeConnection.close() -> NoneCloses the underlying Snowflake connection.
func
lib.streamlit.connections.util.load_from_snowsql_config_file(connection_name:str) -> dict[str, Any]Loads the dictionary from snowsql config file.
func
lib.streamlit.connections.util.running_in_sis() -> boolReturn whether this app is running in SiS.
class
lib.streamlit.cursor.CursorA pointer to a delta location in the app.
method
lib.streamlit.cursor.Cursor.index() -> intThe index of the Delta within its parent block.
method
lib.streamlit.cursor.Cursor.parent_path() -> tuple[int, ...]The cursor's parent's path within its container.
class
lib.streamlit.cursor.SparseListA list-like data structure that only stores non-empty items.
method
lib.streamlit.cursor.SparseList.items() -> Iterator[tuple[int, T]]Iterate through (index, value) for filled entries.
func
lib.streamlit.cursor.get_container_cursor(root_container:int | None) -> RunningCursor | NoneReturn the top-level RunningCursor for the given container.
class
lib.streamlit.dataframe.lazy_df_adapters.PolarsLazyFrameSourceLazy source backed by a Polars ``LazyFrame``.
class
lib.streamlit.dataframe.lazy_df_source.SortSpecServer-side sort state for a single column.
class
lib.streamlit.dataframe_util.DBAPICursorProtocol for DBAPI 2.0 Cursor objects (PEP 249).
class
lib.streamlit.dataframe_util.DataFormatDataFormat is used to determine the format of the data.
func
lib.streamlit.dataframe_util.convert_anything_to_list(obj:OptionSequence[V_co]) -> list[V_co]Try to convert different formats to a list.
func
lib.streamlit.dataframe_util.convert_arrow_bytes_to_pandas_df(source:bytes) -> DataFrameConvert Arrow bytes (IPC format) to pandas.DataFrame.
func
lib.streamlit.dataframe_util.convert_arrow_table_to_arrow_bytes(table:pa.Table) -> bytesSerialize pyarrow.Table to Arrow IPC bytes.
func
lib.streamlit.dataframe_util.convert_pandas_df_to_arrow_bytes(df:DataFrame, *downcast_large_types:bool=False) -> bytesSerialize pandas.DataFrame to Arrow IPC bytes.
func
lib.streamlit.dataframe_util.convert_pandas_df_to_arrow_table(df:DataFrame, *preserve_index:bool | None=None) -> pa.TableConvert a pandas.DataFrame to a pyarrow.Table.
func
lib.streamlit.dataframe_util.determine_data_format(input_data:Any) -> DataFormatDetermine the data format of the input data.
func
lib.streamlit.dataframe_util.has_range_index(df:DataFrame) -> boolTrue if the dataframe has a range index.
func
lib.streamlit.dataframe_util.is_dask_object(obj:object) -> boolTrue if obj is a Dask DataFrame, Series, or Index.
func
lib.streamlit.dataframe_util.is_dataframe_like(obj:object) -> boolTrue if the object is a dataframe-like object.
func
lib.streamlit.dataframe_util.is_dbapi_cursor(obj:object) -> TypeGuard[DBAPICursor]True if obj looks like a DB API 2.0 Cursor.
func
lib.streamlit.dataframe_util.is_duckdb_relation(obj:object) -> boolTrue if obj is a DuckDB relation.
func
lib.streamlit.dataframe_util.is_modin_data_object(obj:object) -> boolTrue if obj is of Modin Dataframe or Series.
func
lib.streamlit.dataframe_util.is_pandas_data_object(obj:object) -> boolTrue if obj is a Pandas object (e.g.
func
lib.streamlit.dataframe_util.is_pandas_styler(obj:object) -> TypeGuard[Styler]True if obj is a pandas Styler.
func
lib.streamlit.dataframe_util.is_polars_dataframe(obj:object) -> boolTrue if obj is a Polars Dataframe.
func
lib.streamlit.dataframe_util.is_polars_lazyframe(obj:object) -> boolTrue if obj is a Polars Lazyframe.
func
lib.streamlit.dataframe_util.is_polars_series(obj:object) -> boolTrue if obj is a Polars Series.
func
lib.streamlit.dataframe_util.is_pyspark_data_object(obj:object) -> boolTrue if obj is a PySpark or PySpark Connect dataframe.
func
lib.streamlit.dataframe_util.is_snowpandas_data_object(obj:object) -> boolTrue if obj is a Snowpark Pandas DataFrame or Series.
func
lib.streamlit.dataframe_util.is_snowpark_data_object(obj:object) -> boolTrue if obj is a Snowpark DataFrame or Table.
func
lib.streamlit.dataframe_util.is_snowpark_row_list(obj:object) -> boolTrue if obj is a list of snowflake.snowpark.row.Row.
func
lib.streamlit.dataframe_util.is_xarray_data_array(obj:object) -> boolTrue if obj is a Xarray DataArray.
func
lib.streamlit.dataframe_util.is_xarray_dataset(obj:object) -> boolTrue if obj is a Xarray Dataset.
class
lib.streamlit.delta_generator.DeltaGeneratorCreator of Delta protobuf messages.
func
lib.streamlit.delta_generator_singletons.get_dg_singleton_instance() -> DeltaGeneratorSingletonReturn the DeltaGeneratorSingleton instance.
func
lib.streamlit.deprecation_util.deprecate_obj_name(obj:TObj, old_name:str, new_name:str, removal_date:str, include_st_prefix:bool=True) -> TObjWrap an `st` object whose name has changed.
func
lib.streamlit.deprecation_util.show_deprecation_warning(message:str, show_in_browser:bool=True, show_once:bool=False) -> NoneShow a deprecation warning message.
class
lib.streamlit.elements.arrow.DataframeSelectionStateThe schema for the dataframe selection state.
class
lib.streamlit.elements.arrow.DataframeStateThe schema for the dataframe event state.
func
lib.streamlit.elements.arrow.marshall(proto:ArrowDataProto, data:Data, default_uuid:str | None=None) -> NoneMarshall pandas.DataFrame into an ArrowData proto.
class
lib.streamlit.elements.deck_gl_json_chart.PydeckSelectionStateThe schema for the PyDeck chart selection state.
class
lib.streamlit.elements.deck_gl_json_chart.PydeckStateThe schema for the PyDeck event state.
func
lib.streamlit.elements.exception.marshall(exception_proto:ExceptionProto, exception:BaseException, width:WidthWithoutContent='stretch', is_uncaught_app_exception:bool=False) -> NoneMarshalls an Exception.proto message.
method
lib.streamlit.elements.form.FormMixin.dg() -> DeltaGeneratorThe associated DeltaGenerator.
func
lib.streamlit.elements.graphviz_chart.marshall(proto:GraphVizChartProto, figure_or_dot:FigureOrDot, element_id:str) -> NoneConstruct a GraphViz chart object.
func
lib.streamlit.elements.iframe.marshall(proto:IFrameProto, src:str | None=None, srcdoc:str | None=None, scrolling:bool=False, tab_index:int | None=None) -> NoneMarshalls data into an IFrame proto.
func
lib.streamlit.elements.lib.color_util.is_builtin_color_name(color:object) -> boolCheck whether the input is a built-in Streamlit color name.
func
lib.streamlit.elements.lib.color_util.is_color_like(color:object) -> boolA fairly lightweight check of whether the input is a color.
func
lib.streamlit.elements.lib.color_util.is_color_tuple_like(color:object) -> boolCheck whether the input looks like a tuple color.
func
lib.streamlit.elements.lib.color_util.is_css_color_like(color:object) -> boolCheck whether the input looks like something Vega can use.
func
lib.streamlit.elements.lib.color_util.is_hex_color_like(color:object) -> boolCheck whether the input looks like a hex color.
func
lib.streamlit.elements.lib.color_util.to_css_color(color:MaybeColor) -> ColorConvert input into a CSS-compatible color that Vega can use.
func
lib.streamlit.elements.lib.column_config_utils.determine_dataframe_schema(data_df:DataFrame, arrow_schema:pa.Schema) -> DataframeSchemaDetermine the schema of a dataframe.
func
lib.streamlit.elements.lib.dicttools.remove_none_values(input_dict:Mapping[Any, Any]) -> dict[Any, Any]Remove all keys with None values from a dict.
class
lib.streamlit.elements.lib.form_utils.FormDataForm data stored on a DeltaGenerator.
func
lib.streamlit.elements.lib.form_utils.is_in_form(dg:DeltaGenerator) -> boolTrue if the DeltaGenerator is inside an st.form block.
class
lib.streamlit.elements.lib.js_number.JSNumberUtility class for exposing JavaScript Number constants.
func
lib.streamlit.elements.lib.layout_utils.get_gap_config(gap:Gap | None, element_type:str) -> GapConfigConvert a gap value to a ``GapConfig`` proto.
func
lib.streamlit.elements.lib.layout_utils.get_text_alignment_config(text_alignment:TextAlignment) -> TextAlignmentConfigConvert text alignment string to proto config.
func
lib.streamlit.elements.lib.layout_utils.validate_height(height:Height | Literal['auto'] | None, allow_content:bool=False, allow_stretch:bool=True, additional_allowed:list[str] | None=None) -> NoneValidate the height parameter.
func
lib.streamlit.elements.lib.layout_utils.validate_space_size(size:SpaceSize) -> NoneValidate the size parameter for st.space.
func
lib.streamlit.elements.lib.layout_utils.validate_text_alignment(text_alignment:TextAlignment) -> NoneValidate the text_alignment parameter.
func
lib.streamlit.elements.lib.layout_utils.validate_width(width:Width | None, allow_content:bool=False) -> NoneValidate the width parameter.
class
lib.streamlit.elements.lib.mutable_expander_container.ExpanderContainerA container returned by ``st.expander``.
method
lib.streamlit.elements.lib.mutable_expander_container.ExpanderContainer.open() -> bool | NoneThe open/collapsed state of the expander.
class
lib.streamlit.elements.lib.mutable_popover_container.PopoverContainerA container returned by ``st.popover``.
method
lib.streamlit.elements.lib.mutable_popover_container.PopoverContainer.open() -> bool | NoneThe open/closed state of the popover.
class
lib.streamlit.elements.lib.mutable_tab_container.TabContainerA container returned for each tab in ``st.tabs``.
method
lib.streamlit.elements.lib.mutable_tab_container.TabContainer.open() -> bool | NoneWhether this tab is the currently active tab.
func
lib.streamlit.elements.lib.options_selector_utils.get_default_range() -> tuple[T, T]Get the default range value.
func
lib.streamlit.elements.lib.options_selector_utils.is_valid(val:Any) -> boolCheck if a value exists in options via format_func comparison.
func
lib.streamlit.elements.lib.pandas_styler_utils.marshall_styler(proto:ArrowDataProto, styler:Styler, default_uuid:str) -> NoneMarshall pandas.Styler into an ArrowData proto.
class
lib.streamlit.elements.plotly_chart.PlotlySelectionStateThe schema for the Plotly chart selection state.
class
lib.streamlit.elements.plotly_chart.PlotlyStateThe schema for the Plotly chart event state.
func
lib.streamlit.elements.table.parse_border_mode(border:bool | Literal['horizontal']) -> TableProto.BorderMode.ValueTypeParse and check the user provided border mode.
class
lib.streamlit.elements.vega_charts.VegaChartsMixinMix-in class for all vega-related chart commands.
method
lib.streamlit.elements.vega_charts.VegaChartsMixin.dg() -> DeltaGeneratorThe associated DeltaGenerator.
class
lib.streamlit.elements.vega_charts.VegaLiteStateThe schema for the Vega-Lite event state.
class
lib.streamlit.elements.widgets.data_editor.DataEditorStateThe schema for the data editor state.
class
lib.streamlit.elements.widgets.feedback.FeedbackSerdeSerializer/deserializer for feedback widget values.
method
lib.streamlit.elements.widgets.feedback.FeedbackSerde.deserialize(ui_value:str | None) -> int | NoneDeserialize string wire format back to int value.
method
lib.streamlit.elements.widgets.feedback.FeedbackSerde.serialize(value:int | None) -> strSerialize int value to string for wire format.
class
lib.streamlit.elements.widgets.radio.RadioSerdeSerializer/deserializer for Radio widget values.
func
lib.streamlit.elements.write.WriteMixin.flush_stream_response() -> NoneWrite the full response to the app.
func
lib.streamlit.env_util.is_executable_in_path(name:str) -> boolCheck if executable is in OS path.
func
lib.streamlit.env_util.is_pex() -> boolReturn if streamlit running in pex.
func
lib.streamlit.env_util.is_repl() -> boolReturn True if running in the Python REPL.
func
lib.streamlit.error_util.handle_uncaught_app_exception(ex:BaseException) -> NoneHandle an exception that originated from a user app.
func
lib.streamlit.error_util.invoke_script_error_handler(ex:Exception, on_script_error:Callable[[Exception], bool | None] | None) -> boolInvoke the on_script_error handler if set.
func
lib.streamlit.error_util.show_uncaught_app_exception(ex:BaseException) -> NoneShow the exception on the frontend.
class
lib.streamlit.errors.CustomComponentErrorExceptions thrown in the custom components code path.
class
lib.streamlit.errors.ErrorThe base class for all exceptions thrown by Streamlit.
class
lib.streamlit.errors.MarkdownFormattedExceptionExceptions with Markdown in their description.
class
lib.streamlit.errors.StreamlitAPIExceptionBase class for Streamlit API exceptions.
class
lib.streamlit.errors.StreamlitAPIWarningUsed to display a warning.
class
lib.streamlit.errors.StreamlitInvalidHeightErrorException raised when an invalid height value is provided.
class
lib.streamlit.errors.StreamlitInvalidMenuItemKeyErrorException raised when an invalid key is specified.
class
lib.streamlit.errors.StreamlitInvalidSizeErrorException raised when an invalid size value is provided.
class
lib.streamlit.errors.StreamlitInvalidThemeErrorException raised for general theme errors.
class
lib.streamlit.errors.StreamlitInvalidWidthErrorException raised when an invalid width value is provided.
class
lib.streamlit.errors.StreamlitPageNotFoundErrorException raised the linked page can not be found.
class
lib.streamlit.errors.StreamlitValueErrorException raised when a value is not valid for a parameter.
func
lib.streamlit.file_util.file_is_in_folder_glob(filepath:str, folderpath_glob:str) -> boolTest whether a file is in some folder with globbing support.
func
lib.streamlit.file_util.get_app_static_dir(main_script_path:str) -> strGet the folder where app static files live.
func
lib.streamlit.file_util.get_directory_size(directory:str) -> intReturn the size of a directory in bytes.
func
lib.streamlit.file_util.get_encoded_file_data(data:bytes, encoding:str='auto') -> io.StringIO | io.BytesIOCoerce bytes to a BytesIO or a StringIO.
func
lib.streamlit.file_util.get_main_script_directory(main_script:str) -> strReturn the full path to the main script directory.
func
lib.streamlit.file_util.get_project_streamlit_file_path(*filepath:str) -> strReturn the full path to a filepath in ${CWD}/.streamlit.
func
lib.streamlit.file_util.get_static_dir() -> strGet the folder where static HTML/JS/CSS files live.
func
lib.streamlit.file_util.get_streamlit_file_path(*filepath:str) -> strReturn the full path to a file in ~/.streamlit.
func
lib.streamlit.file_util.normalize_path_join(*args:str) -> strReturn the normalized path of the joined path.
func
lib.streamlit.hello.utils.show_code(demo:Callable[..., Any]) -> NoneShowing the code of the demo.
func
lib.streamlit.logger.get_logger(name:str) -> logging.LoggerReturn a logger.
func
lib.streamlit.logger.init_uvicorn_logs() -> NoneSet Uvicorn and related server log levels.
func
lib.streamlit.logger.set_log_level(level:str | int) -> NoneSet log level.
func
lib.streamlit.logger.setup_formatter(logger:logging.Logger) -> NoneSet up the console formatter for a given logger.
class
lib.streamlit.navigation.page.PageConfigure a page for ``st.navigation`` in a multipage app.
method
lib.streamlit.navigation.page.Page.icon() -> strThe icon of the page.
method
lib.streamlit.navigation.page.Page.is_external() -> boolWhether this page is an external URL.
method
lib.streamlit.navigation.page.Page.run() -> NoneExecute the page.
method
lib.streamlit.navigation.page.Page.title() -> strThe title of the page.
func
lib.streamlit.net_util.get_external_ip() -> str | NoneGet the *external* IP address of the current machine.
func
lib.streamlit.net_util.get_internal_ip() -> str | NoneGet the *local* IP address of the current machine.
func
lib.streamlit.path_security.is_windows_unc_path(path:str) -> boolReturn True if ``path`` is a Windows UNC or device namespace path.
method
lib.streamlit.runtime.app_session.AppSession.clear_session_caches() -> NoneClears session-level caches for this session.
method
lib.streamlit.runtime.app_session.AppSession.clear_user_info() -> NoneClear the user info for this session.
method
lib.streamlit.runtime.app_session.AppSession.handle_backmsg(msg:BackMsg) -> NoneProcess a BackMsg.
method
lib.streamlit.runtime.app_session.AppSession.request_rerun(client_state:ClientState | None) -> NoneSignal that we're interested in running the script.
method
lib.streamlit.runtime.app_session.AppSession.request_script_stop() -> NoneRequest that the scriptrunner stop execution.
method
lib.streamlit.runtime.app_session.AppSession.shutdown() -> NoneShut down the AppSession.
class
lib.streamlit.runtime.backend_operation_handler.BackendOperationHandlerProtocol for backend operation request handlers.
class
lib.streamlit.runtime.backend_operation_handler.DeferredFileHandlerHandler for deferred file download requests.
func
lib.streamlit.runtime.caching.cache_background_refresh.reset() -> NoneReset the process-wide manager.
class
lib.streamlit.runtime.caching.cache_data_api.DataCachesManages all DataCache instances.
method
lib.streamlit.runtime.caching.cache_data_api.DataCaches.clear_all() -> NoneClear all in-memory and on-disk caches.
method
lib.streamlit.runtime.caching.cache_data_api.DataCaches.clear_session(session_id:str) -> NoneClears all caches for the given session ID.
func
lib.streamlit.runtime.caching.cache_data_api.clear_session_cache(session_id:str) -> NoneClears all caches for the given session ID.
func
lib.streamlit.runtime.caching.cache_errors.get_cached_func_name_md(func:Any) -> strGet markdown representation of the function name.
class
lib.streamlit.runtime.caching.cache_resource_api.ResourceCachesManages all ResourceCache instances.
method
lib.streamlit.runtime.caching.cache_resource_api.ResourceCaches.clear_all() -> NoneClear all resource caches.
method
lib.streamlit.runtime.caching.cache_resource_api.ResourceCaches.clear_session(session_id:str) -> NoneClears all caches for the given session ID.
func
lib.streamlit.runtime.caching.cache_resource_api.clear_session_cache(session_id:str) -> NoneClears all caches for the given session ID.
class
lib.streamlit.runtime.caching.cache_type.CacheTypeThe function cache types we implement.
class
lib.streamlit.runtime.caching.cache_utils.CacheFunction cache interface.
method
lib.streamlit.runtime.caching.cache_utils.Cache.clear(key:str | None=None) -> NoneClear values from this cache.
method
lib.streamlit.runtime.caching.cache_utils.Cache.is_active() -> boolWhether this cache is still attached to its manager.
method
lib.streamlit.runtime.caching.cache_utils.Cache.read_result(value_key:str) -> CachedResult[R]Read a value and associated messages from the cache.
method
lib.streamlit.runtime.caching.cache_utils.Cache.read_result_and_freshness(value_key:str) -> CacheReadResult[R]Read a value together with its freshness.
class
lib.streamlit.runtime.caching.cache_utils.CachedFuncInfoEncapsulates data for a cached function instance.
method
lib.streamlit.runtime.caching.cache_utils.CachedFuncInfo.display_name() -> strA human-readable name for the cached function.
method
lib.streamlit.runtime.caching.cache_utils.CachedFuncInfo.get_function_cache(function_key:str) -> Cache[R]Get or create the function cache for the given key.
class
lib.streamlit.runtime.caching.storage.cache_storage_protocol.CacheStorageErrorBase exception raised by the cache storage.
class
lib.streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper.InMemoryCacheStorageWrapperIn-memory cache storage wrapper.
method
lib.streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper.InMemoryCacheStorageWrapper.close() -> NoneCloses the cache storage.
method
lib.streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper.InMemoryCacheStorageWrapper.delete(key:str) -> NoneDelete a given key.
method
lib.streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper.InMemoryCacheStorageWrapper.set(key:str, value:bytes) -> NoneSets the value for a given key.
class
lib.streamlit.runtime.caching.ttl_cache.TTLCacheLRU cache with a uniform per-item time-to-live.
method
lib.streamlit.runtime.caching.ttl_cache.TTLCache.maxsize() -> floatThe maximum number of entries the cache may hold.
method
lib.streamlit.runtime.caching.ttl_cache.TTLCache.timer() -> Callable[[], float]The timer function used by the cache.
class
lib.streamlit.runtime.context.ContextProxyAn interface to access user session context.
method
lib.streamlit.runtime.context.ContextProxy.ip_address() -> str | NoneThe read-only IP address of the user's connection.
method
lib.streamlit.runtime.context.ContextProxy.is_embedded() -> bool | NoneWhether the app is embedded.
method
lib.streamlit.runtime.context.ContextProxy.locale() -> str | NoneThe read-only locale of the user's browser.
method
lib.streamlit.runtime.context.ContextProxy.timezone() -> str | NoneThe read-only timezone of the user's browser.
method
lib.streamlit.runtime.context.ContextProxy.url() -> str | NoneThe read-only URL of the app in the user's browser.
class
lib.streamlit.runtime.context.StreamlitThemeA dictionary-like object containing theme information.
func
lib.streamlit.runtime.context_util.maybe_add_page_path(url:str, page_manager:PagesManager) -> strAdd the page path to the URL if it exists.
func
lib.streamlit.runtime.context_util.maybe_trim_page_path(url:str, page_manager:PagesManager) -> strTrim the page path from the URL if it exists.
class
lib.streamlit.runtime.credentials.CredentialsCredentials class.
method
lib.streamlit.runtime.credentials.Credentials.activate(show_instructions:bool=True) -> NoneActivate Streamlit.
method
lib.streamlit.runtime.credentials.Credentials.get_current() -> CredentialsReturn the singleton instance.
method
lib.streamlit.runtime.credentials.Credentials.load(auto_resolve:bool=False) -> NoneLoad from toml file.
method
lib.streamlit.runtime.credentials.Credentials.reset() -> NoneReset credentials by removing file.
method
lib.streamlit.runtime.credentials.Credentials.save() -> NoneSave to toml file and send email.
func
lib.streamlit.runtime.credentials.check_credentials() -> NoneCheck credentials and potentially activate.
func
lib.streamlit.runtime.exists() -> boolTrue if the singleton Runtime instance has been created.
func
lib.streamlit.runtime.forward_msg_cache.populate_hash_if_needed(msg:ForwardMsg) -> NoneComputes and assigns the unique hash for a ForwardMsg.
class
lib.streamlit.runtime.forward_msg_queue.ForwardMsgQueueAccumulates a session's outgoing ForwardMsgs.
class
lib.streamlit.runtime.fragment.FragmentStorageA key-value store for Fragments.
method
lib.streamlit.runtime.fragment.FragmentStorage.clear_outside_wrappers() -> NoneDrop every stored wrapper record.
method
lib.streamlit.runtime.fragment.FragmentStorage.contains(key:str) -> boolReturn whether the given key is present in this FragmentStorage.
method
lib.streamlit.runtime.fragment.FragmentStorage.delete(key:str) -> NoneDelete the fragment corresponding to the given key.
method
lib.streamlit.runtime.fragment.FragmentStorage.lookup(key:str) -> FragmentLook up a fragment to re-execute.
method
lib.streamlit.runtime.fragment.FragmentStorage.register(key:str, fragment:Fragment, *parent_fragment_id:str | None=None) -> NoneStore a fragment definition.
func
lib.streamlit.runtime.get_instance() -> RuntimeReturn the singleton Runtime instance.
class
lib.streamlit.runtime.media_file_manager.DeferredCallableEntryTyped metadata for deferred download callables.
class
lib.streamlit.runtime.media_file_manager.MediaFileManagerIn-memory file manager for MediaFile objects.
method
lib.streamlit.runtime.media_file_manager.MediaFileManager.clear_session_refs(session_id:str | None=None) -> NoneRemove the given session's file references.
class
lib.streamlit.runtime.memory_media_file_storage.MemoryFileA MediaFile stored in memory.
class
lib.streamlit.runtime.memory_session_storage.MemorySessionStorageA SessionStorage that stores sessions in memory.
method
lib.streamlit.runtime.metrics_util.Installation.instance() -> InstallationReturns the singleton Installation.
func
lib.streamlit.runtime.metrics_util.to_microseconds(seconds:float) -> intConvert seconds into microseconds.
class
lib.streamlit.runtime.runtime.AsyncObjectsContainer for all asyncio objects that Runtime manages.
method
lib.streamlit.runtime.runtime.Runtime.clear_user_info_for_session(session_id:str) -> NoneClear the user_info for the given session_id.
method
lib.streamlit.runtime.runtime.Runtime.close_session(session_id:str) -> NoneClose and completely shut down a session.
method
lib.streamlit.runtime.runtime.Runtime.disconnect_session(session_id:str, *client:SessionClient | None=None) -> NoneDisconnect a session.
method
lib.streamlit.runtime.runtime.Runtime.handle_backmsg(session_id:str, msg:BackMsg, *client:SessionClient | None=None) -> NoneSend a BackMsg to an active session.
method
lib.streamlit.runtime.runtime.Runtime.instance() -> RuntimeReturn the singleton Runtime instance.
method
lib.streamlit.runtime.runtime.Runtime.is_active_session(session_id:str) -> boolTrue if the session_id belongs to an active session.
method
lib.streamlit.runtime.runtime.Runtime.start() -> NoneStart the runtime.
class
lib.streamlit.runtime.runtime.RuntimeConfigConfig options for StreamlitRuntime.
func
lib.streamlit.runtime.runtime_util.get_max_message_size_bytes() -> intReturns the max websocket message size in bytes.
func
lib.streamlit.runtime.runtime_util.serialize_forward_msg(msg:ForwardMsg) -> bytesSerialize a ForwardMsg to send to a client.
class
lib.streamlit.runtime.script_data.ScriptDataContains parameters related to running a script.
func
lib.streamlit.runtime.scriptrunner.magic.add_magic(code:str, script_path:str) -> AnyModifies the code to support magic Streamlit commands.
func
lib.streamlit.runtime.scriptrunner.magic_funcs.transparent_write(*args:Any) -> AnyThe function that gets magic-ified into Streamlit apps.
class
lib.streamlit.runtime.scriptrunner.script_cache.ScriptCacheThread-safe cache of Python script bytecode.
method
lib.streamlit.runtime.scriptrunner.script_cache.ScriptCache.clear() -> NoneRemove all entries from the cache.
class
lib.streamlit.runtime.scriptrunner_utils.exceptions.RerunExceptionSilently stop and rerun the user's script.
class
lib.streamlit.runtime.scriptrunner_utils.exceptions.ScriptControlExceptionBase exception for ScriptRunner.
class
lib.streamlit.runtime.scriptrunner_utils.exceptions.StopExceptionSilently stop the execution of the user's script.
class
lib.streamlit.runtime.scriptrunner_utils.script_requests.RerunDataData attached to RERUN requests.
class
lib.streamlit.runtime.scriptrunner_utils.script_requests.ScriptRequestA STOP or RERUN request and associated data.
class
lib.streamlit.runtime.scriptrunner_utils.script_run_context.FragmentThreadStatePer-thread state for a fragment execution.
func
lib.streamlit.runtime.scriptrunner_utils.script_run_context.enqueue_message(msg:ForwardMsg) -> NoneEnqueues a ForwardMsg proto to send to the app.
class
lib.streamlit.runtime.secrets.SecretsA dict-like class that stores secrets.
method
lib.streamlit.runtime.secrets.Secrets.has_key(k:str) -> boolTrue if the given key is in the dict.
method
lib.streamlit.runtime.secrets.Secrets.items() -> ItemsView[str, Any]A view of the key-value items in the dict.
method
lib.streamlit.runtime.secrets.Secrets.keys() -> KeysView[str]A view of the keys in the dict.
method
lib.streamlit.runtime.secrets.Secrets.load_if_toml_exists() -> boolLoad secrets.toml files from disk if they exists.
method
lib.streamlit.runtime.secrets.Secrets.merge_programmatic_secrets(programmatic_secrets:Mapping[str, SecretsValue]) -> NoneMerge programmatic secrets into the secrets store.
method
lib.streamlit.runtime.secrets.Secrets.values() -> ValuesView[Any]A view of the values in the dict.
class
lib.streamlit.runtime.session_manager.ActiveSessionInfoType containing data related to an active session.
class
lib.streamlit.runtime.session_manager.ClientContextContext for the client WebSocket connection.
method
lib.streamlit.runtime.session_manager.ClientContext.cookies() -> Mapping[str, str]Cookies as a name-to-value mapping.
method
lib.streamlit.runtime.session_manager.ClientContext.headers() -> Iterable[tuple[str, str]]All headers as (name, value) tuples.
class
lib.streamlit.runtime.session_manager.SessionClientInterface for sending data to a session's client.
method
lib.streamlit.runtime.session_manager.SessionClient.write_forward_msg(msg:ForwardMsg) -> NoneDeliver a ForwardMsg to the client.
class
lib.streamlit.runtime.session_manager.SessionInfoType containing data related to an AppSession.
method
lib.streamlit.runtime.session_manager.SessionManager.close_session(session_id:str) -> NoneClose and completely delete the session with the given id.
method
lib.streamlit.runtime.session_manager.SessionManager.disconnect_session(session_id:str) -> NoneDisconnect the given session.
class
lib.streamlit.runtime.state.common.WidgetMetadataMetadata associated with a single widget.
func
lib.streamlit.runtime.state.common.require_valid_user_key(key:str) -> NoneRaise an Exception if the given user_key is invalid.
method
lib.streamlit.runtime.state.query_params.QueryParams.bind_widget(param_key:str, widget_id:str, value_type:str, script_hash:str) -> NoneRegister a widget binding to a query parameter.
method
lib.streamlit.runtime.state.query_params.QueryParams.get_binding_for_param(param_key:str) -> WidgetBinding | NoneGet the binding for a query parameter.
method
lib.streamlit.runtime.state.query_params.QueryParams.get_binding_for_widget(widget_id:str) -> WidgetBinding | NoneGet the binding for a widget.
method
lib.streamlit.runtime.state.query_params.QueryParams.get_initial_value(param_key:str) -> str | list[str] | NoneGet the initial URL value for a query parameter.
method
lib.streamlit.runtime.state.query_params.QueryParams.has_param(param_key:str) -> boolReturn whether a query parameter currently exists.
method
lib.streamlit.runtime.state.query_params.QueryParams.is_bound(param_key:str) -> boolCheck if a query parameter is bound to a widget.
method
lib.streamlit.runtime.state.query_params.QueryParams.remove_param(param_key:str) -> boolRemove a query parameter without protection checks.
method
lib.streamlit.runtime.state.query_params.QueryParams.set_corrected_value(param_key:str, value:Any, value_type:str) -> NoneSet a corrected value for a query parameter.
method
lib.streamlit.runtime.state.query_params.QueryParams.unbind_widget(widget_id:str) -> NoneRemove a widget binding.
class
lib.streamlit.runtime.state.safe_session_state.SafeSessionStateThread-safe wrapper around SessionState.
class
lib.streamlit.runtime.state.session_state.KeyIdMapperA mapping of user-provided keys to element IDs.
class
lib.streamlit.runtime.state.session_state.SerializedA widget value that's serialized to a protobuf.
method
lib.streamlit.runtime.state.session_state.SessionState.register_widget(metadata:WidgetMetadata[T], user_key:str | None) -> RegisterWidgetResult[T]Register a widget with the SessionState.
class
lib.streamlit.runtime.state.session_state.ValueA widget value that's not serialized.
class
lib.streamlit.runtime.state.session_state.WStatesA mapping of widget IDs to values.
method
lib.streamlit.runtime.state.session_state.WStates.remove_stale_widgets(active_widget_ids:frozenset[str], fragment_ids_this_run:list[str] | None) -> NoneRemove widget state for stale widgets.
class
lib.streamlit.runtime.stats.CacheStatDescribes a single cache entry.
method
lib.streamlit.runtime.stats.CacheStat.marshall_metric_proto(metric:MetricProto) -> NoneFill an OpenMetrics `Metric` protobuf object.
class
lib.streamlit.runtime.stats.CounterStatA counter stat.
method
lib.streamlit.runtime.stats.CounterStat.marshall_metric_proto(metric:MetricProto) -> NoneFill an OpenMetrics `Metric` protobuf object.
class
lib.streamlit.runtime.stats.GaugeStatA gauge stat.
method
lib.streamlit.runtime.stats.GaugeStat.marshall_metric_proto(metric:MetricProto) -> NoneFill an OpenMetrics `Metric` protobuf object.
method
lib.streamlit.runtime.stats.Stat.family_name() -> strThe name of the metric family (e.g.
method
lib.streamlit.runtime.stats.Stat.help() -> strA description of the metric.
method
lib.streamlit.runtime.stats.Stat.marshall_metric_proto(metric:MetricProto) -> NoneFill an OpenMetrics `Metric` protobuf object.
method
lib.streamlit.runtime.stats.Stat.to_metric_str() -> strConvert this stat to an OpenMetrics-formatted string.
method
lib.streamlit.runtime.stats.Stat.type() -> strThe OpenMetrics type (e.g.
method
lib.streamlit.runtime.stats.Stat.unit() -> strThe unit of the metric (e.g.
func
lib.streamlit.runtime.stats.safe_sizeof(obj:Any) -> intReturn the memory size of an object in bytes, or 0 if sizing fails.
class
lib.streamlit.runtime.uploaded_file_manager.UploadedFileA mutable uploaded file.
class
lib.streamlit.runtime.uploaded_file_manager.UploadedFileRecMetadata and raw bytes for an uploaded file.
func
lib.streamlit.source_util.open_python_file(filename:str) -> TextIOOpen a read-only Python file taking proper care of its encoding.
func
lib.streamlit.source_util.page_icon_and_name(script_path:Path) -> tuple[str, str]Compute the icon and name of a page from its script path.
func
lib.streamlit.string_util.clean_text(text:SupportsStr) -> strConvert an object to text, dedent it, and strip whitespace.
func
lib.streamlit.string_util.extract_leading_icon(text:str) -> tuple[str, str]Extract a leading emoji or material icon from text.
func
lib.streamlit.string_util.from_number(value:AnyNumber) -> strRender a real numeric type as a string for display.
func
lib.streamlit.string_util.is_binary_string(inp:bytes) -> boolGuess if an input bytesarray can be encoded as a string.
func
lib.streamlit.string_util.is_emoji(text:str) -> boolCheck if input string is a valid emoji.
func
lib.streamlit.string_util.is_material_icon(maybe_icon:str) -> boolCheck if input string is a valid Material icon.
func
lib.streamlit.string_util.is_mem_address_str(string:str) -> boolReturns True if the string looks like <foo blarg at 0x15ee6f9a0>.
func
lib.streamlit.string_util.simplify_number(num:int) -> strSimplifies number into Human readable format, returns str.
func
lib.streamlit.string_util.to_snake_case(camel_case_str:str) -> strConverts UpperCamelCase and lowerCamelCase to snake_case.
class
lib.streamlit.temporary_directory.TemporaryDirectoryTemporary directory context manager.
func
lib.streamlit.time_util.adjust_years(input_date:date, years:int) -> dateAdd or subtract years from a date.
class
lib.streamlit.type_util.CustomDictProtocol for Streamlit native custom dictionaries (e.g.
この情報について
掲載しているシグネチャは streamlit/streamlit の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。