idmd.app.DataApp
- class idmd.app.DataApp(title='Interactive Data Manipulator and Descriptor', layout='wide')[source]
Bases:
objectOrchestrates component integration and layout for a Streamlit application.
Initializes the DataApp with a title and layout.
- Args:
title (str): The title of the application. Defaults to “Interactive Data Manipulator and Descriptor”. layout (str): The layout of the application. Can be “centered” or “wide”. Defaults to “wide”.
Methods
Registers a component to the application.
Executes the application rendering process.
Sets a name and optional color for a specific column.
Sets a color for the application title.
- add_component(component)[source]
Registers a component to the application.
- Return type:
- Args:
- component (Component): The component to add. The component must have a
position attribute and a render method.
- Returns:
DataApp: The current instance of the DataApp, allowing method chaining.
- run()[source]
Executes the application rendering process.
This method sets the title of the application and renders all registered components.
- Return type:
None
- set_column_name(column_index, name, color=None)[source]
Sets a name and optional color for a specific column.
- Return type:
- Args:
column_index (int): The index of the column. name (str): The name to set for the column. color (Optional[str]): The color to set for the column name (e.g., “blue”, “#123456”). Defaults to None.
- Returns:
DataApp: The current instance of the DataApp, allowing method chaining.