brk-code

streamlit の API リファレンス

streamlit (streamlit/streamlit) の公開 API 400 件 —— クラス 102、関数 198、メソッド 100。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: streamlit/streamlit

種別件数
クラス102
関数198
メソッド100

API 一覧

funce2e_playwright.load_testing.generate_report.main() -> int
Main entry point for the report generator.
funce2e_playwright.load_testing.metrics_collector.compute_percentile(sorted_values:list[float], percentile:float) -> float
Calculate percentile using linear interpolation.
funce2e_playwright.load_testing.scenarios.dataframe_app.create_dataframe(rows:int, cols:int) -> pd.DataFrame
Create a large dataframe for testing.
funce2e_playwright.load_testing.worker.run_worker_session(server_url:str, worker_id:int, scenario:str, timeout_sec:int=120) -> SessionMetrics
Execute one user session in a worker process.
funce2e_playwright.shared.animation_utils.check_if_offscreen(app:Page, img:Locator) -> bool
Determines if an element is rendered but outside the viewport.
funce2e_playwright.shared.animation_utils.check_if_onscreen(app:Page, img:Locator) -> bool
Determines if an element is visible within the viewport.
funce2e_playwright.shared.app_target.wait_for_app_target_loaded(app:AppTarget) -> None
Wait for initial app load (works when hosted in an iframe).
funce2e_playwright.shared.app_target.wait_for_app_target_run(app:AppTarget, *wait_delay:int=100, *initial_wait:int=210) -> None
Wait for the given app target to finish running.
classe2e_playwright.shared.app_utils.LocatorContext
A minimal DOM-query context for Playwright tests.
funce2e_playwright.shared.app_utils.check_top_level_class(app:Page, test_id:str) -> None
Check that the top level class is correctly set.
funce2e_playwright.shared.app_utils.expand_sidebar(app:Page) -> Locator
Expands the sidebar.
funce2e_playwright.shared.app_utils.expect_exception(locator:Locator | Page, expected_message:str | re.Pattern[str] | None=None) -> None
Expect an exception to be displayed in the app.
funce2e_playwright.shared.app_utils.expect_no_skeletons(locator:Locator | Page | FrameLocator, timeout:int=10000) -> None
Expect no skeletons to be visible on the page.
funce2e_playwright.shared.app_utils.expect_warning(locator:Locator | Page, expected_message:str | re.Pattern[str]) -> None
Expect a warning to be displayed in the app.
funce2e_playwright.shared.app_utils.fill_number_input(locator:Locator | Page, label:str | re.Pattern[str], value:int) -> None
Set the value of a number input.
funce2e_playwright.shared.app_utils.get_button(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a button widget with the given label.
funce2e_playwright.shared.app_utils.get_button_group(app:Page, key:str) -> Locator
Get a button group with the given key.
funce2e_playwright.shared.app_utils.get_camera_input(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a camera input with the given label.
funce2e_playwright.shared.app_utils.get_caption(locator:Locator | Page, text_inside_caption:str | re.Pattern[str]) -> Locator
Get a caption element with the given text inside.
funce2e_playwright.shared.app_utils.get_chat_input(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a chat input container by its label.
funce2e_playwright.shared.app_utils.get_checkbox(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a checkbox widget with the given label.
funce2e_playwright.shared.app_utils.get_color_picker(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a color picker with the given label.
funce2e_playwright.shared.app_utils.get_date_input(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a date input with the given label.
funce2e_playwright.shared.app_utils.get_datetime_input(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a datetime input with the given label.
funce2e_playwright.shared.app_utils.get_element_by_key(locator:Locator | Page, key:str) -> Locator
Get an element with the given user-defined key.
funce2e_playwright.shared.app_utils.get_expander(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a expander container with the given label.
funce2e_playwright.shared.app_utils.get_feedback(app:Page, key:str) -> Locator
Get a feedback widget with the given key.
funce2e_playwright.shared.app_utils.get_form_submit_button(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a form submit button with the given label.
funce2e_playwright.shared.app_utils.get_heading(locator:Locator | Page, text_inside_heading:str | re.Pattern[str]) -> Locator
Get a heading element with the given text inside.
funce2e_playwright.shared.app_utils.get_image(locator:Locator | Page, caption:str | re.Pattern[str]) -> Locator
Get an image element with the given caption.
funce2e_playwright.shared.app_utils.get_markdown(locator:Locator | Page, text_inside_markdown:str | re.Pattern[str]) -> Locator
Get a markdown element with the given text inside.
funce2e_playwright.shared.app_utils.get_metric(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a metric element with the given label.
funce2e_playwright.shared.app_utils.get_multiselect(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a multiselect with the given label.
funce2e_playwright.shared.app_utils.get_number_input(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a number input with the given label.
funce2e_playwright.shared.app_utils.get_popover(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a popover with the given label.
funce2e_playwright.shared.app_utils.get_radio(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a radio widget with the given label.
funce2e_playwright.shared.app_utils.get_radio_option(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a radio button widget with the given label.
funce2e_playwright.shared.app_utils.get_segment_button(locator:Locator, text:str) -> Locator
Get a segment button with the given button group.
funce2e_playwright.shared.app_utils.get_selectbox(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a selectbox with the given label.
funce2e_playwright.shared.app_utils.get_slider(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a slider with the given label.
funce2e_playwright.shared.app_utils.get_text(locator:Locator | Page, text:str | re.Pattern[str]) -> Locator
Get a text element with the given text.
funce2e_playwright.shared.app_utils.get_text_area(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a text area with the given label.
funce2e_playwright.shared.app_utils.get_text_input(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a text input with the given label.
funce2e_playwright.shared.app_utils.get_time_input(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a time input with the given label.
funce2e_playwright.shared.app_utils.get_toggle(locator:Locator | Page, label:str | re.Pattern[str]) -> Locator
Get a toggle widget with the given label.
funce2e_playwright.shared.app_utils.reset_focus(locator:LocatorContext) -> None
Reset the focus of the app.
funce2e_playwright.shared.app_utils.reset_hovering(locator:LocatorContext) -> None
Reset the hovering of the app.
funce2e_playwright.shared.app_utils.tab_until_focused(page:Page, locator:Locator, max_tabs:int=50) -> None
Tab through the page until the given locator is focused.
funce2e_playwright.shared.app_utils.type_time(time_display:Locator, hour:str, minute:str, second:str | None=None) -> None
Type a time into a TimeInput's spinbutton segments.
funce2e_playwright.shared.dataframe_utils.expect_canvas_to_be_visible(locator:Locator) -> None
Expect canvas to be visible.
funce2e_playwright.shared.dataframe_utils.get_open_cell_overlay(page:Page | Locator) -> Locator
Get the currently open cell overlay / editor.
funce2e_playwright.shared.dataframe_utils.retry_interaction(func:Callable[[], Any], max_attempts:int=3, delay_ms:int=100) -> Any
Retry a potentially flaky interaction.
funce2e_playwright.shared.dataframe_utils.select_row(dataframe_element:Locator, row_pos:int, column_width:Literal['small', 'medium', 'large']='small') -> None
Select the specified row in the dataframe.
funce2e_playwright.shared.dataframe_utils.unfocus_dataframe(page:Page) -> None
Unfocus the dataframe.
funce2e_playwright.shared.git_utils.get_git_root() -> Path
Get the root directory of the git repository.
funce2e_playwright.shared.performance.start_capture_traces(page:Page) -> None
Start capturing traces using the PerformanceObserver API.
funce2e_playwright.shared.performance.with_cdp_session(page:Page) -> Generator[CDPSession, None, None]
Create a new Chrome DevTools Protocol session.
funce2e_playwright.shared.pydeck_utils.click_point(click_handling_div:Locator, coords:Position) -> None
Helper function to click on a point.
funce2e_playwright.shared.react18_utils.wait_for_react_stability(page:Page, timeout_ms:int=1000) -> None
Wait for React 18 rendering to stabilize.
classe2e_playwright.shared.stats_reporter.StatsCollector
Collects test statistics during a pytest session.
methode2e_playwright.shared.stats_reporter.StatsReporterPlugin.pytest_sessionstart(session:pytest.Session) -> None
Called at the start of the test session.
classe2e_playwright.shared.stats_reporter.TestResult
Holds the result of a single test.
classe2e_playwright.shared.stats_reporter.WorkerStats
Statistics for a single xdist worker.
funce2e_playwright.shared.stats_reporter.pytest_addoption(parser:pytest.Parser) -> None
Register command-line options for the stats reporter.
funce2e_playwright.shared.stats_reporter.pytest_configure(config:Config) -> None
Register the stats reporter plugin if not disabled.
funce2e_playwright.shared.theme_utils.apply_theme_via_window(page:Page, base:str='light', **theme_options:Any) -> None
Apply custom theme via window.__streamlit injection.
funce2e_playwright.shared.vega_utils.get_vega_graphics_document(chart:Locator) -> Locator
Return the Vega "graphics-document" element(s) for a chart.
classe2e_playwright.st_app_advanced.CustomAPIError
Custom exception for testing exception handlers.
funce2e_playwright.st_app_advanced.api_data(request:Request) -> JSONResponse
Return test data from a custom API endpoint.
funce2e_playwright.st_app_advanced.api_error(request:Request) -> JSONResponse
Raise a custom exception to test exception handlers.
funce2e_playwright.st_app_advanced.api_lifespan_check(request:Request) -> JSONResponse
Return lifespan events to verify startup hook was called.
funce2e_playwright.st_dataframe_config.get_data_uri(file_path:Path, mime_type:str) -> str
Convert a file to a base64 data URI.
funce2e_playwright.st_download_button_deferred.failing_callable() -> str
Callable that always raises an error.
funce2e_playwright.st_download_button_deferred.generate_binary_data() -> bytes
Generate binary data.
funce2e_playwright.st_download_button_deferred.generate_csv_data() -> str
Generate CSV data when download is clicked.
funce2e_playwright.st_download_button_deferred.generate_large_data() -> str
Generate a larger dataset.
classe2e_playwright.st_help.FooWithLongDocs
My docstring.
classe2e_playwright.st_help.FooWithMixedDocs
My docstring.
methode2e_playwright.st_help.FooWithMixedDocs.my_func_1(a:int, b:bool=False) -> None
Func with doc.
classe2e_playwright.st_magic.Foo
Class docstring.
classe2e_playwright.st_magic.MyClass
MyClass: this help block should be printed.
funce2e_playwright.st_magic.docstrings()
Docstring.
funce2e_playwright.st_magic.nested()
Multiline docstring.
classe2e_playwright.st_multiselect.CustomOption
Custom class without __eq__ implementation.
funclib.streamlit..agents.skills.developing-with-streamlit.assets.templates.apps.dashboard-compute.streamlit_app.load_region_data() -> pd.DataFrame
Load credits by region.
funclib.streamlit.auth_util.decode_provider_token(provider_token:str) -> ProviderTokenPayload
Decode the JWT token and validate the claims.
funclib.streamlit.auth_util.encode_provider_token(provider:str) -> str
Returns a signed JWT token with the provider and expiration time.
funclib.streamlit.auth_util.get_secrets_auth_section() -> AttrDict
Get the 'auth' section of the secrets.toml.
funclib.streamlit.auth_util.is_authlib_installed() -> bool
Check if Authlib is installed.
funclib.streamlit.cli_util.open_browser(url:str) -> None
Open a web browser pointing to a given URL.
funclib.streamlit.commands.execution_control.rerun(*scope:Literal['app', 'fragment']='app') -> NoReturn
Rerun the script immediately.
funclib.streamlit.commands.execution_control.stop() -> NoReturn
Stops execution immediately.
funclib.streamlit.commands.navigation.convert_to_streamlit_page(page_input:PageType) -> Page
Convert various input types to Page objects.
classlib.streamlit.components.types.base_component_registry.BaseComponentRegistry
Interface for ComponentRegistries.
methodlib.streamlit.components.types.base_component_registry.BaseComponentRegistry.register_component(component:BaseCustomComponent) -> None
Register a CustomComponent.
classlib.streamlit.components.types.base_custom_component.BaseCustomComponent
Interface for CustomComponents.
funclib.streamlit.components.v1.component_arrow.arrow_proto_to_dataframe(proto:ArrowTableProto) -> DataFrame
Convert ArrowTable proto to pandas.DataFrame.
funclib.streamlit.components.v1.component_arrow.marshall(proto:ArrowTableProto, data:Any, default_uuid:str | None=None) -> None
Marshall data into an ArrowTable proto.
classlib.streamlit.components.v1.custom_component.CustomComponent
A Custom Component declaration.
classlib.streamlit.components.v2.component_registry.BidiComponentDefinition
Definition of a bidirectional component V2.
classlib.streamlit.components.v2.component_registry.BidiComponentRegistry
Registry for bidirectional components V2.
methodlib.streamlit.components.v2.component_registry.BidiComponentRegistry.unregister(name:str) -> None
Remove a component definition from the registry.
classlib.streamlit.components.v2.manifest_scanner.ComponentConfig
Structured configuration for a single component entry.
methodlib.streamlit.components.v2.manifest_scanner.ComponentConfig.from_dict(config:dict[str, Any]) -> ComponentConfig
Create a ComponentConfig from a raw dict.
classlib.streamlit.components.v2.manifest_scanner.ComponentManifest
Parsed component manifest data.
funclib.streamlit.config.get_config_files(file_name:str) -> list[str]
Return the list of config files (e.g.
funclib.streamlit.config.get_option(key:str) -> Any
Return the current value of a given Streamlit configuration option.
funclib.streamlit.config.get_options_for_section(section:str) -> dict[str, Any]
Get all of the config options for the given section.
funclib.streamlit.config.get_where_defined(key:str) -> str
Indicate where (e.g.
funclib.streamlit.config.is_manually_set(option_name:str) -> bool
Check if a given option was actually defined by the user.
funclib.streamlit.config.process_section(section_path:str, section_data:dict[str, Any]) -> None
Recursively process nested sections of the config file.
funclib.streamlit.config.set_option(key:str, value:Any, where_defined:str=_USER_DEFINED) -> None
Set config option.
funclib.streamlit.config.set_user_option(key:str, value:Any) -> None
Set a configuration option.
funclib.streamlit.config.show_config() -> None
Print all config options to the terminal.
classlib.streamlit.config_option.ConfigOption
Stores a Streamlit configuration option.
methodlib.streamlit.config_option.ConfigOption.is_expired() -> bool
Returns true if expiration_date is in the past.
methodlib.streamlit.config_option.ConfigOption.set_value(value:Any, where_defined:str | None=None) -> None
Set the value of this option.
methodlib.streamlit.config_option.ConfigOption.value() -> Any
The value of this config option.
classlib.streamlit.connections.snowflake_connection.BaseSnowflakeConnection
Base class for Snowflake connections.
methodlib.streamlit.connections.snowflake_connection.BaseSnowflakeConnection.close() -> None
Closes the underlying Snowflake connection.
funclib.streamlit.connections.util.load_from_snowsql_config_file(connection_name:str) -> dict[str, Any]
Loads the dictionary from snowsql config file.
funclib.streamlit.connections.util.running_in_sis() -> bool
Return whether this app is running in SiS.
classlib.streamlit.cursor.Cursor
A pointer to a delta location in the app.
methodlib.streamlit.cursor.Cursor.index() -> int
The index of the Delta within its parent block.
methodlib.streamlit.cursor.Cursor.parent_path() -> tuple[int, ...]
The cursor's parent's path within its container.
classlib.streamlit.cursor.SparseList
A list-like data structure that only stores non-empty items.
methodlib.streamlit.cursor.SparseList.items() -> Iterator[tuple[int, T]]
Iterate through (index, value) for filled entries.
funclib.streamlit.cursor.get_container_cursor(root_container:int | None) -> RunningCursor | None
Return the top-level RunningCursor for the given container.
classlib.streamlit.dataframe.lazy_df_adapters.PolarsLazyFrameSource
Lazy source backed by a Polars ``LazyFrame``.
classlib.streamlit.dataframe.lazy_df_source.SortSpec
Server-side sort state for a single column.
classlib.streamlit.dataframe_util.DBAPICursor
Protocol for DBAPI 2.0 Cursor objects (PEP 249).
classlib.streamlit.dataframe_util.DataFormat
DataFormat is used to determine the format of the data.
funclib.streamlit.dataframe_util.convert_anything_to_list(obj:OptionSequence[V_co]) -> list[V_co]
Try to convert different formats to a list.
funclib.streamlit.dataframe_util.convert_arrow_bytes_to_pandas_df(source:bytes) -> DataFrame
Convert Arrow bytes (IPC format) to pandas.DataFrame.
funclib.streamlit.dataframe_util.convert_arrow_table_to_arrow_bytes(table:pa.Table) -> bytes
Serialize pyarrow.Table to Arrow IPC bytes.
funclib.streamlit.dataframe_util.convert_pandas_df_to_arrow_bytes(df:DataFrame, *downcast_large_types:bool=False) -> bytes
Serialize pandas.DataFrame to Arrow IPC bytes.
funclib.streamlit.dataframe_util.convert_pandas_df_to_arrow_table(df:DataFrame, *preserve_index:bool | None=None) -> pa.Table
Convert a pandas.DataFrame to a pyarrow.Table.
funclib.streamlit.dataframe_util.determine_data_format(input_data:Any) -> DataFormat
Determine the data format of the input data.
funclib.streamlit.dataframe_util.has_range_index(df:DataFrame) -> bool
True if the dataframe has a range index.
funclib.streamlit.dataframe_util.is_dask_object(obj:object) -> bool
True if obj is a Dask DataFrame, Series, or Index.
funclib.streamlit.dataframe_util.is_dataframe_like(obj:object) -> bool
True if the object is a dataframe-like object.
funclib.streamlit.dataframe_util.is_dbapi_cursor(obj:object) -> TypeGuard[DBAPICursor]
True if obj looks like a DB API 2.0 Cursor.
funclib.streamlit.dataframe_util.is_duckdb_relation(obj:object) -> bool
True if obj is a DuckDB relation.
funclib.streamlit.dataframe_util.is_modin_data_object(obj:object) -> bool
True if obj is of Modin Dataframe or Series.
funclib.streamlit.dataframe_util.is_pandas_data_object(obj:object) -> bool
True if obj is a Pandas object (e.g.
funclib.streamlit.dataframe_util.is_pandas_styler(obj:object) -> TypeGuard[Styler]
True if obj is a pandas Styler.
funclib.streamlit.dataframe_util.is_polars_dataframe(obj:object) -> bool
True if obj is a Polars Dataframe.
funclib.streamlit.dataframe_util.is_polars_lazyframe(obj:object) -> bool
True if obj is a Polars Lazyframe.
funclib.streamlit.dataframe_util.is_polars_series(obj:object) -> bool
True if obj is a Polars Series.
funclib.streamlit.dataframe_util.is_pyspark_data_object(obj:object) -> bool
True if obj is a PySpark or PySpark Connect dataframe.
funclib.streamlit.dataframe_util.is_snowpandas_data_object(obj:object) -> bool
True if obj is a Snowpark Pandas DataFrame or Series.
funclib.streamlit.dataframe_util.is_snowpark_data_object(obj:object) -> bool
True if obj is a Snowpark DataFrame or Table.
funclib.streamlit.dataframe_util.is_snowpark_row_list(obj:object) -> bool
True if obj is a list of snowflake.snowpark.row.Row.
funclib.streamlit.dataframe_util.is_xarray_data_array(obj:object) -> bool
True if obj is a Xarray DataArray.
funclib.streamlit.dataframe_util.is_xarray_dataset(obj:object) -> bool
True if obj is a Xarray Dataset.
classlib.streamlit.delta_generator.DeltaGenerator
Creator of Delta protobuf messages.
funclib.streamlit.delta_generator_singletons.get_dg_singleton_instance() -> DeltaGeneratorSingleton
Return the DeltaGeneratorSingleton instance.
funclib.streamlit.deprecation_util.deprecate_obj_name(obj:TObj, old_name:str, new_name:str, removal_date:str, include_st_prefix:bool=True) -> TObj
Wrap an `st` object whose name has changed.
funclib.streamlit.deprecation_util.show_deprecation_warning(message:str, show_in_browser:bool=True, show_once:bool=False) -> None
Show a deprecation warning message.
classlib.streamlit.elements.arrow.DataframeSelectionState
The schema for the dataframe selection state.
classlib.streamlit.elements.arrow.DataframeState
The schema for the dataframe event state.
funclib.streamlit.elements.arrow.marshall(proto:ArrowDataProto, data:Data, default_uuid:str | None=None) -> None
Marshall pandas.DataFrame into an ArrowData proto.
classlib.streamlit.elements.deck_gl_json_chart.PydeckSelectionState
The schema for the PyDeck chart selection state.
classlib.streamlit.elements.deck_gl_json_chart.PydeckState
The schema for the PyDeck event state.
funclib.streamlit.elements.exception.marshall(exception_proto:ExceptionProto, exception:BaseException, width:WidthWithoutContent='stretch', is_uncaught_app_exception:bool=False) -> None
Marshalls an Exception.proto message.
methodlib.streamlit.elements.form.FormMixin.dg() -> DeltaGenerator
The associated DeltaGenerator.
funclib.streamlit.elements.graphviz_chart.marshall(proto:GraphVizChartProto, figure_or_dot:FigureOrDot, element_id:str) -> None
Construct a GraphViz chart object.
funclib.streamlit.elements.iframe.marshall(proto:IFrameProto, src:str | None=None, srcdoc:str | None=None, scrolling:bool=False, tab_index:int | None=None) -> None
Marshalls data into an IFrame proto.
funclib.streamlit.elements.lib.color_util.is_builtin_color_name(color:object) -> bool
Check whether the input is a built-in Streamlit color name.
funclib.streamlit.elements.lib.color_util.is_color_like(color:object) -> bool
A fairly lightweight check of whether the input is a color.
funclib.streamlit.elements.lib.color_util.is_color_tuple_like(color:object) -> bool
Check whether the input looks like a tuple color.
funclib.streamlit.elements.lib.color_util.is_css_color_like(color:object) -> bool
Check whether the input looks like something Vega can use.
funclib.streamlit.elements.lib.color_util.is_hex_color_like(color:object) -> bool
Check whether the input looks like a hex color.
funclib.streamlit.elements.lib.color_util.to_css_color(color:MaybeColor) -> Color
Convert input into a CSS-compatible color that Vega can use.
funclib.streamlit.elements.lib.column_config_utils.determine_dataframe_schema(data_df:DataFrame, arrow_schema:pa.Schema) -> DataframeSchema
Determine the schema of a dataframe.
funclib.streamlit.elements.lib.dicttools.remove_none_values(input_dict:Mapping[Any, Any]) -> dict[Any, Any]
Remove all keys with None values from a dict.
classlib.streamlit.elements.lib.form_utils.FormData
Form data stored on a DeltaGenerator.
funclib.streamlit.elements.lib.form_utils.is_in_form(dg:DeltaGenerator) -> bool
True if the DeltaGenerator is inside an st.form block.
classlib.streamlit.elements.lib.js_number.JSNumber
Utility class for exposing JavaScript Number constants.
funclib.streamlit.elements.lib.layout_utils.get_gap_config(gap:Gap | None, element_type:str) -> GapConfig
Convert a gap value to a ``GapConfig`` proto.
funclib.streamlit.elements.lib.layout_utils.get_text_alignment_config(text_alignment:TextAlignment) -> TextAlignmentConfig
Convert text alignment string to proto config.
funclib.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) -> None
Validate the height parameter.
funclib.streamlit.elements.lib.layout_utils.validate_space_size(size:SpaceSize) -> None
Validate the size parameter for st.space.
funclib.streamlit.elements.lib.layout_utils.validate_text_alignment(text_alignment:TextAlignment) -> None
Validate the text_alignment parameter.
funclib.streamlit.elements.lib.layout_utils.validate_width(width:Width | None, allow_content:bool=False) -> None
Validate the width parameter.
classlib.streamlit.elements.lib.mutable_expander_container.ExpanderContainer
A container returned by ``st.expander``.
methodlib.streamlit.elements.lib.mutable_expander_container.ExpanderContainer.open() -> bool | None
The open/collapsed state of the expander.
classlib.streamlit.elements.lib.mutable_popover_container.PopoverContainer
A container returned by ``st.popover``.
methodlib.streamlit.elements.lib.mutable_popover_container.PopoverContainer.open() -> bool | None
The open/closed state of the popover.
classlib.streamlit.elements.lib.mutable_tab_container.TabContainer
A container returned for each tab in ``st.tabs``.
methodlib.streamlit.elements.lib.mutable_tab_container.TabContainer.open() -> bool | None
Whether this tab is the currently active tab.
funclib.streamlit.elements.lib.options_selector_utils.get_default_range() -> tuple[T, T]
Get the default range value.
funclib.streamlit.elements.lib.options_selector_utils.is_valid(val:Any) -> bool
Check if a value exists in options via format_func comparison.
funclib.streamlit.elements.lib.pandas_styler_utils.marshall_styler(proto:ArrowDataProto, styler:Styler, default_uuid:str) -> None
Marshall pandas.Styler into an ArrowData proto.
classlib.streamlit.elements.plotly_chart.PlotlySelectionState
The schema for the Plotly chart selection state.
classlib.streamlit.elements.plotly_chart.PlotlyState
The schema for the Plotly chart event state.
funclib.streamlit.elements.table.parse_border_mode(border:bool | Literal['horizontal']) -> TableProto.BorderMode.ValueType
Parse and check the user provided border mode.
classlib.streamlit.elements.vega_charts.VegaChartsMixin
Mix-in class for all vega-related chart commands.
methodlib.streamlit.elements.vega_charts.VegaChartsMixin.dg() -> DeltaGenerator
The associated DeltaGenerator.
classlib.streamlit.elements.vega_charts.VegaLiteState
The schema for the Vega-Lite event state.
classlib.streamlit.elements.widgets.data_editor.DataEditorState
The schema for the data editor state.
classlib.streamlit.elements.widgets.feedback.FeedbackSerde
Serializer/deserializer for feedback widget values.
methodlib.streamlit.elements.widgets.feedback.FeedbackSerde.deserialize(ui_value:str | None) -> int | None
Deserialize string wire format back to int value.
methodlib.streamlit.elements.widgets.feedback.FeedbackSerde.serialize(value:int | None) -> str
Serialize int value to string for wire format.
classlib.streamlit.elements.widgets.radio.RadioSerde
Serializer/deserializer for Radio widget values.
funclib.streamlit.elements.write.WriteMixin.flush_stream_response() -> None
Write the full response to the app.
funclib.streamlit.env_util.is_executable_in_path(name:str) -> bool
Check if executable is in OS path.
funclib.streamlit.env_util.is_pex() -> bool
Return if streamlit running in pex.
funclib.streamlit.env_util.is_repl() -> bool
Return True if running in the Python REPL.
funclib.streamlit.error_util.handle_uncaught_app_exception(ex:BaseException) -> None
Handle an exception that originated from a user app.
funclib.streamlit.error_util.invoke_script_error_handler(ex:Exception, on_script_error:Callable[[Exception], bool | None] | None) -> bool
Invoke the on_script_error handler if set.
funclib.streamlit.error_util.show_uncaught_app_exception(ex:BaseException) -> None
Show the exception on the frontend.
classlib.streamlit.errors.CustomComponentError
Exceptions thrown in the custom components code path.
classlib.streamlit.errors.Error
The base class for all exceptions thrown by Streamlit.
classlib.streamlit.errors.MarkdownFormattedException
Exceptions with Markdown in their description.
classlib.streamlit.errors.StreamlitAPIException
Base class for Streamlit API exceptions.
classlib.streamlit.errors.StreamlitAPIWarning
Used to display a warning.
classlib.streamlit.errors.StreamlitInvalidHeightError
Exception raised when an invalid height value is provided.
classlib.streamlit.errors.StreamlitInvalidMenuItemKeyError
Exception raised when an invalid key is specified.
classlib.streamlit.errors.StreamlitInvalidSizeError
Exception raised when an invalid size value is provided.
classlib.streamlit.errors.StreamlitInvalidThemeError
Exception raised for general theme errors.
classlib.streamlit.errors.StreamlitInvalidWidthError
Exception raised when an invalid width value is provided.
classlib.streamlit.errors.StreamlitPageNotFoundError
Exception raised the linked page can not be found.
classlib.streamlit.errors.StreamlitValueError
Exception raised when a value is not valid for a parameter.
funclib.streamlit.file_util.file_is_in_folder_glob(filepath:str, folderpath_glob:str) -> bool
Test whether a file is in some folder with globbing support.
funclib.streamlit.file_util.get_app_static_dir(main_script_path:str) -> str
Get the folder where app static files live.
funclib.streamlit.file_util.get_directory_size(directory:str) -> int
Return the size of a directory in bytes.
funclib.streamlit.file_util.get_encoded_file_data(data:bytes, encoding:str='auto') -> io.StringIO | io.BytesIO
Coerce bytes to a BytesIO or a StringIO.
funclib.streamlit.file_util.get_main_script_directory(main_script:str) -> str
Return the full path to the main script directory.
funclib.streamlit.file_util.get_project_streamlit_file_path(*filepath:str) -> str
Return the full path to a filepath in ${CWD}/.streamlit.
funclib.streamlit.file_util.get_static_dir() -> str
Get the folder where static HTML/JS/CSS files live.
funclib.streamlit.file_util.get_streamlit_file_path(*filepath:str) -> str
Return the full path to a file in ~/.streamlit.
funclib.streamlit.file_util.normalize_path_join(*args:str) -> str
Return the normalized path of the joined path.
funclib.streamlit.hello.utils.show_code(demo:Callable[..., Any]) -> None
Showing the code of the demo.
funclib.streamlit.logger.get_logger(name:str) -> logging.Logger
Return a logger.
funclib.streamlit.logger.init_uvicorn_logs() -> None
Set Uvicorn and related server log levels.
funclib.streamlit.logger.set_log_level(level:str | int) -> None
Set log level.
funclib.streamlit.logger.setup_formatter(logger:logging.Logger) -> None
Set up the console formatter for a given logger.
classlib.streamlit.navigation.page.Page
Configure a page for ``st.navigation`` in a multipage app.
methodlib.streamlit.navigation.page.Page.icon() -> str
The icon of the page.
methodlib.streamlit.navigation.page.Page.is_external() -> bool
Whether this page is an external URL.
methodlib.streamlit.navigation.page.Page.run() -> None
Execute the page.
methodlib.streamlit.navigation.page.Page.title() -> str
The title of the page.
funclib.streamlit.net_util.get_external_ip() -> str | None
Get the *external* IP address of the current machine.
funclib.streamlit.net_util.get_internal_ip() -> str | None
Get the *local* IP address of the current machine.
funclib.streamlit.path_security.is_windows_unc_path(path:str) -> bool
Return True if ``path`` is a Windows UNC or device namespace path.
methodlib.streamlit.runtime.app_session.AppSession.clear_session_caches() -> None
Clears session-level caches for this session.
methodlib.streamlit.runtime.app_session.AppSession.clear_user_info() -> None
Clear the user info for this session.
methodlib.streamlit.runtime.app_session.AppSession.handle_backmsg(msg:BackMsg) -> None
Process a BackMsg.
methodlib.streamlit.runtime.app_session.AppSession.request_rerun(client_state:ClientState | None) -> None
Signal that we're interested in running the script.
methodlib.streamlit.runtime.app_session.AppSession.request_script_stop() -> None
Request that the scriptrunner stop execution.
methodlib.streamlit.runtime.app_session.AppSession.shutdown() -> None
Shut down the AppSession.
classlib.streamlit.runtime.backend_operation_handler.BackendOperationHandler
Protocol for backend operation request handlers.
classlib.streamlit.runtime.backend_operation_handler.DeferredFileHandler
Handler for deferred file download requests.
funclib.streamlit.runtime.caching.cache_background_refresh.reset() -> None
Reset the process-wide manager.
classlib.streamlit.runtime.caching.cache_data_api.DataCaches
Manages all DataCache instances.
methodlib.streamlit.runtime.caching.cache_data_api.DataCaches.clear_all() -> None
Clear all in-memory and on-disk caches.
methodlib.streamlit.runtime.caching.cache_data_api.DataCaches.clear_session(session_id:str) -> None
Clears all caches for the given session ID.
funclib.streamlit.runtime.caching.cache_data_api.clear_session_cache(session_id:str) -> None
Clears all caches for the given session ID.
funclib.streamlit.runtime.caching.cache_errors.get_cached_func_name_md(func:Any) -> str
Get markdown representation of the function name.
classlib.streamlit.runtime.caching.cache_resource_api.ResourceCaches
Manages all ResourceCache instances.
methodlib.streamlit.runtime.caching.cache_resource_api.ResourceCaches.clear_all() -> None
Clear all resource caches.
methodlib.streamlit.runtime.caching.cache_resource_api.ResourceCaches.clear_session(session_id:str) -> None
Clears all caches for the given session ID.
funclib.streamlit.runtime.caching.cache_resource_api.clear_session_cache(session_id:str) -> None
Clears all caches for the given session ID.
classlib.streamlit.runtime.caching.cache_type.CacheType
The function cache types we implement.
classlib.streamlit.runtime.caching.cache_utils.Cache
Function cache interface.
methodlib.streamlit.runtime.caching.cache_utils.Cache.clear(key:str | None=None) -> None
Clear values from this cache.
methodlib.streamlit.runtime.caching.cache_utils.Cache.is_active() -> bool
Whether this cache is still attached to its manager.
methodlib.streamlit.runtime.caching.cache_utils.Cache.read_result(value_key:str) -> CachedResult[R]
Read a value and associated messages from the cache.
methodlib.streamlit.runtime.caching.cache_utils.Cache.read_result_and_freshness(value_key:str) -> CacheReadResult[R]
Read a value together with its freshness.
classlib.streamlit.runtime.caching.cache_utils.CachedFuncInfo
Encapsulates data for a cached function instance.
methodlib.streamlit.runtime.caching.cache_utils.CachedFuncInfo.display_name() -> str
A human-readable name for the cached function.
methodlib.streamlit.runtime.caching.cache_utils.CachedFuncInfo.get_function_cache(function_key:str) -> Cache[R]
Get or create the function cache for the given key.
classlib.streamlit.runtime.caching.storage.cache_storage_protocol.CacheStorageError
Base exception raised by the cache storage.
classlib.streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper.InMemoryCacheStorageWrapper
In-memory cache storage wrapper.
methodlib.streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper.InMemoryCacheStorageWrapper.close() -> None
Closes the cache storage.
methodlib.streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper.InMemoryCacheStorageWrapper.delete(key:str) -> None
Delete a given key.
methodlib.streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper.InMemoryCacheStorageWrapper.set(key:str, value:bytes) -> None
Sets the value for a given key.
classlib.streamlit.runtime.caching.ttl_cache.TTLCache
LRU cache with a uniform per-item time-to-live.
methodlib.streamlit.runtime.caching.ttl_cache.TTLCache.maxsize() -> float
The maximum number of entries the cache may hold.
methodlib.streamlit.runtime.caching.ttl_cache.TTLCache.timer() -> Callable[[], float]
The timer function used by the cache.
classlib.streamlit.runtime.context.ContextProxy
An interface to access user session context.
methodlib.streamlit.runtime.context.ContextProxy.ip_address() -> str | None
The read-only IP address of the user's connection.
methodlib.streamlit.runtime.context.ContextProxy.is_embedded() -> bool | None
Whether the app is embedded.
methodlib.streamlit.runtime.context.ContextProxy.locale() -> str | None
The read-only locale of the user's browser.
methodlib.streamlit.runtime.context.ContextProxy.timezone() -> str | None
The read-only timezone of the user's browser.
methodlib.streamlit.runtime.context.ContextProxy.url() -> str | None
The read-only URL of the app in the user's browser.
classlib.streamlit.runtime.context.StreamlitTheme
A dictionary-like object containing theme information.
funclib.streamlit.runtime.context_util.maybe_add_page_path(url:str, page_manager:PagesManager) -> str
Add the page path to the URL if it exists.
funclib.streamlit.runtime.context_util.maybe_trim_page_path(url:str, page_manager:PagesManager) -> str
Trim the page path from the URL if it exists.
classlib.streamlit.runtime.credentials.Credentials
Credentials class.
methodlib.streamlit.runtime.credentials.Credentials.activate(show_instructions:bool=True) -> None
Activate Streamlit.
methodlib.streamlit.runtime.credentials.Credentials.get_current() -> Credentials
Return the singleton instance.
methodlib.streamlit.runtime.credentials.Credentials.load(auto_resolve:bool=False) -> None
Load from toml file.
methodlib.streamlit.runtime.credentials.Credentials.reset() -> None
Reset credentials by removing file.
methodlib.streamlit.runtime.credentials.Credentials.save() -> None
Save to toml file and send email.
funclib.streamlit.runtime.credentials.check_credentials() -> None
Check credentials and potentially activate.
funclib.streamlit.runtime.exists() -> bool
True if the singleton Runtime instance has been created.
funclib.streamlit.runtime.forward_msg_cache.populate_hash_if_needed(msg:ForwardMsg) -> None
Computes and assigns the unique hash for a ForwardMsg.
classlib.streamlit.runtime.forward_msg_queue.ForwardMsgQueue
Accumulates a session's outgoing ForwardMsgs.
classlib.streamlit.runtime.fragment.FragmentStorage
A key-value store for Fragments.
methodlib.streamlit.runtime.fragment.FragmentStorage.clear_outside_wrappers() -> None
Drop every stored wrapper record.
methodlib.streamlit.runtime.fragment.FragmentStorage.contains(key:str) -> bool
Return whether the given key is present in this FragmentStorage.
methodlib.streamlit.runtime.fragment.FragmentStorage.delete(key:str) -> None
Delete the fragment corresponding to the given key.
methodlib.streamlit.runtime.fragment.FragmentStorage.lookup(key:str) -> Fragment
Look up a fragment to re-execute.
methodlib.streamlit.runtime.fragment.FragmentStorage.register(key:str, fragment:Fragment, *parent_fragment_id:str | None=None) -> None
Store a fragment definition.
funclib.streamlit.runtime.get_instance() -> Runtime
Return the singleton Runtime instance.
classlib.streamlit.runtime.media_file_manager.DeferredCallableEntry
Typed metadata for deferred download callables.
classlib.streamlit.runtime.media_file_manager.MediaFileManager
In-memory file manager for MediaFile objects.
methodlib.streamlit.runtime.media_file_manager.MediaFileManager.clear_session_refs(session_id:str | None=None) -> None
Remove the given session's file references.
classlib.streamlit.runtime.memory_media_file_storage.MemoryFile
A MediaFile stored in memory.
classlib.streamlit.runtime.memory_session_storage.MemorySessionStorage
A SessionStorage that stores sessions in memory.
methodlib.streamlit.runtime.metrics_util.Installation.instance() -> Installation
Returns the singleton Installation.
funclib.streamlit.runtime.metrics_util.to_microseconds(seconds:float) -> int
Convert seconds into microseconds.
classlib.streamlit.runtime.runtime.AsyncObjects
Container for all asyncio objects that Runtime manages.
methodlib.streamlit.runtime.runtime.Runtime.clear_user_info_for_session(session_id:str) -> None
Clear the user_info for the given session_id.
methodlib.streamlit.runtime.runtime.Runtime.close_session(session_id:str) -> None
Close and completely shut down a session.
methodlib.streamlit.runtime.runtime.Runtime.disconnect_session(session_id:str, *client:SessionClient | None=None) -> None
Disconnect a session.
methodlib.streamlit.runtime.runtime.Runtime.handle_backmsg(session_id:str, msg:BackMsg, *client:SessionClient | None=None) -> None
Send a BackMsg to an active session.
methodlib.streamlit.runtime.runtime.Runtime.instance() -> Runtime
Return the singleton Runtime instance.
methodlib.streamlit.runtime.runtime.Runtime.is_active_session(session_id:str) -> bool
True if the session_id belongs to an active session.
methodlib.streamlit.runtime.runtime.Runtime.start() -> None
Start the runtime.
classlib.streamlit.runtime.runtime.RuntimeConfig
Config options for StreamlitRuntime.
funclib.streamlit.runtime.runtime_util.get_max_message_size_bytes() -> int
Returns the max websocket message size in bytes.
funclib.streamlit.runtime.runtime_util.serialize_forward_msg(msg:ForwardMsg) -> bytes
Serialize a ForwardMsg to send to a client.
classlib.streamlit.runtime.script_data.ScriptData
Contains parameters related to running a script.
funclib.streamlit.runtime.scriptrunner.magic.add_magic(code:str, script_path:str) -> Any
Modifies the code to support magic Streamlit commands.
funclib.streamlit.runtime.scriptrunner.magic_funcs.transparent_write(*args:Any) -> Any
The function that gets magic-ified into Streamlit apps.
classlib.streamlit.runtime.scriptrunner.script_cache.ScriptCache
Thread-safe cache of Python script bytecode.
methodlib.streamlit.runtime.scriptrunner.script_cache.ScriptCache.clear() -> None
Remove all entries from the cache.
classlib.streamlit.runtime.scriptrunner_utils.exceptions.RerunException
Silently stop and rerun the user's script.
classlib.streamlit.runtime.scriptrunner_utils.exceptions.ScriptControlException
Base exception for ScriptRunner.
classlib.streamlit.runtime.scriptrunner_utils.exceptions.StopException
Silently stop the execution of the user's script.
classlib.streamlit.runtime.scriptrunner_utils.script_requests.RerunData
Data attached to RERUN requests.
classlib.streamlit.runtime.scriptrunner_utils.script_requests.ScriptRequest
A STOP or RERUN request and associated data.
classlib.streamlit.runtime.scriptrunner_utils.script_run_context.FragmentThreadState
Per-thread state for a fragment execution.
funclib.streamlit.runtime.scriptrunner_utils.script_run_context.enqueue_message(msg:ForwardMsg) -> None
Enqueues a ForwardMsg proto to send to the app.
classlib.streamlit.runtime.secrets.Secrets
A dict-like class that stores secrets.
methodlib.streamlit.runtime.secrets.Secrets.has_key(k:str) -> bool
True if the given key is in the dict.
methodlib.streamlit.runtime.secrets.Secrets.items() -> ItemsView[str, Any]
A view of the key-value items in the dict.
methodlib.streamlit.runtime.secrets.Secrets.keys() -> KeysView[str]
A view of the keys in the dict.
methodlib.streamlit.runtime.secrets.Secrets.load_if_toml_exists() -> bool
Load secrets.toml files from disk if they exists.
methodlib.streamlit.runtime.secrets.Secrets.merge_programmatic_secrets(programmatic_secrets:Mapping[str, SecretsValue]) -> None
Merge programmatic secrets into the secrets store.
methodlib.streamlit.runtime.secrets.Secrets.values() -> ValuesView[Any]
A view of the values in the dict.
classlib.streamlit.runtime.session_manager.ActiveSessionInfo
Type containing data related to an active session.
classlib.streamlit.runtime.session_manager.ClientContext
Context for the client WebSocket connection.
methodlib.streamlit.runtime.session_manager.ClientContext.cookies() -> Mapping[str, str]
Cookies as a name-to-value mapping.
methodlib.streamlit.runtime.session_manager.ClientContext.headers() -> Iterable[tuple[str, str]]
All headers as (name, value) tuples.
classlib.streamlit.runtime.session_manager.SessionClient
Interface for sending data to a session's client.
methodlib.streamlit.runtime.session_manager.SessionClient.write_forward_msg(msg:ForwardMsg) -> None
Deliver a ForwardMsg to the client.
classlib.streamlit.runtime.session_manager.SessionInfo
Type containing data related to an AppSession.
methodlib.streamlit.runtime.session_manager.SessionManager.close_session(session_id:str) -> None
Close and completely delete the session with the given id.
methodlib.streamlit.runtime.session_manager.SessionManager.disconnect_session(session_id:str) -> None
Disconnect the given session.
classlib.streamlit.runtime.state.common.WidgetMetadata
Metadata associated with a single widget.
funclib.streamlit.runtime.state.common.require_valid_user_key(key:str) -> None
Raise an Exception if the given user_key is invalid.
methodlib.streamlit.runtime.state.query_params.QueryParams.bind_widget(param_key:str, widget_id:str, value_type:str, script_hash:str) -> None
Register a widget binding to a query parameter.
methodlib.streamlit.runtime.state.query_params.QueryParams.get_binding_for_param(param_key:str) -> WidgetBinding | None
Get the binding for a query parameter.
methodlib.streamlit.runtime.state.query_params.QueryParams.get_binding_for_widget(widget_id:str) -> WidgetBinding | None
Get the binding for a widget.
methodlib.streamlit.runtime.state.query_params.QueryParams.get_initial_value(param_key:str) -> str | list[str] | None
Get the initial URL value for a query parameter.
methodlib.streamlit.runtime.state.query_params.QueryParams.has_param(param_key:str) -> bool
Return whether a query parameter currently exists.
methodlib.streamlit.runtime.state.query_params.QueryParams.is_bound(param_key:str) -> bool
Check if a query parameter is bound to a widget.
methodlib.streamlit.runtime.state.query_params.QueryParams.remove_param(param_key:str) -> bool
Remove a query parameter without protection checks.
methodlib.streamlit.runtime.state.query_params.QueryParams.set_corrected_value(param_key:str, value:Any, value_type:str) -> None
Set a corrected value for a query parameter.
methodlib.streamlit.runtime.state.query_params.QueryParams.unbind_widget(widget_id:str) -> None
Remove a widget binding.
classlib.streamlit.runtime.state.safe_session_state.SafeSessionState
Thread-safe wrapper around SessionState.
classlib.streamlit.runtime.state.session_state.KeyIdMapper
A mapping of user-provided keys to element IDs.
classlib.streamlit.runtime.state.session_state.Serialized
A widget value that's serialized to a protobuf.
methodlib.streamlit.runtime.state.session_state.SessionState.register_widget(metadata:WidgetMetadata[T], user_key:str | None) -> RegisterWidgetResult[T]
Register a widget with the SessionState.
classlib.streamlit.runtime.state.session_state.Value
A widget value that's not serialized.
classlib.streamlit.runtime.state.session_state.WStates
A mapping of widget IDs to values.
methodlib.streamlit.runtime.state.session_state.WStates.remove_stale_widgets(active_widget_ids:frozenset[str], fragment_ids_this_run:list[str] | None) -> None
Remove widget state for stale widgets.
classlib.streamlit.runtime.stats.CacheStat
Describes a single cache entry.
methodlib.streamlit.runtime.stats.CacheStat.marshall_metric_proto(metric:MetricProto) -> None
Fill an OpenMetrics `Metric` protobuf object.
classlib.streamlit.runtime.stats.CounterStat
A counter stat.
methodlib.streamlit.runtime.stats.CounterStat.marshall_metric_proto(metric:MetricProto) -> None
Fill an OpenMetrics `Metric` protobuf object.
classlib.streamlit.runtime.stats.GaugeStat
A gauge stat.
methodlib.streamlit.runtime.stats.GaugeStat.marshall_metric_proto(metric:MetricProto) -> None
Fill an OpenMetrics `Metric` protobuf object.
methodlib.streamlit.runtime.stats.Stat.family_name() -> str
The name of the metric family (e.g.
methodlib.streamlit.runtime.stats.Stat.help() -> str
A description of the metric.
methodlib.streamlit.runtime.stats.Stat.marshall_metric_proto(metric:MetricProto) -> None
Fill an OpenMetrics `Metric` protobuf object.
methodlib.streamlit.runtime.stats.Stat.to_metric_str() -> str
Convert this stat to an OpenMetrics-formatted string.
methodlib.streamlit.runtime.stats.Stat.type() -> str
The OpenMetrics type (e.g.
methodlib.streamlit.runtime.stats.Stat.unit() -> str
The unit of the metric (e.g.
funclib.streamlit.runtime.stats.safe_sizeof(obj:Any) -> int
Return the memory size of an object in bytes, or 0 if sizing fails.
classlib.streamlit.runtime.uploaded_file_manager.UploadedFile
A mutable uploaded file.
classlib.streamlit.runtime.uploaded_file_manager.UploadedFileRec
Metadata and raw bytes for an uploaded file.
funclib.streamlit.source_util.open_python_file(filename:str) -> TextIO
Open a read-only Python file taking proper care of its encoding.
funclib.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.
funclib.streamlit.string_util.clean_text(text:SupportsStr) -> str
Convert an object to text, dedent it, and strip whitespace.
funclib.streamlit.string_util.extract_leading_icon(text:str) -> tuple[str, str]
Extract a leading emoji or material icon from text.
funclib.streamlit.string_util.from_number(value:AnyNumber) -> str
Render a real numeric type as a string for display.
funclib.streamlit.string_util.is_binary_string(inp:bytes) -> bool
Guess if an input bytesarray can be encoded as a string.
funclib.streamlit.string_util.is_emoji(text:str) -> bool
Check if input string is a valid emoji.
funclib.streamlit.string_util.is_material_icon(maybe_icon:str) -> bool
Check if input string is a valid Material icon.
funclib.streamlit.string_util.is_mem_address_str(string:str) -> bool
Returns True if the string looks like <foo blarg at 0x15ee6f9a0>.
funclib.streamlit.string_util.simplify_number(num:int) -> str
Simplifies number into Human readable format, returns str.
funclib.streamlit.string_util.to_snake_case(camel_case_str:str) -> str
Converts UpperCamelCase and lowerCamelCase to snake_case.
classlib.streamlit.temporary_directory.TemporaryDirectory
Temporary directory context manager.
funclib.streamlit.time_util.adjust_years(input_date:date, years:int) -> date
Add or subtract years from a date.
classlib.streamlit.type_util.CustomDict
Protocol for Streamlit native custom dictionaries (e.g.

この情報について

掲載しているシグネチャは streamlit/streamlit の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る