idmd.app.DataApp

class idmd.app.DataApp(title='Interactive Data Manipulator and Descriptor', layout='wide')[source]

Bases: object

Orchestrates 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

add_component

Registers a component to the application.

run

Executes the application rendering process.

set_column_name

Sets a name and optional color for a specific column.

set_title_color

Sets a color for the application title.

add_component(component)[source]

Registers a component to the application.

Return type:

DataApp

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:

DataApp

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.

set_title_color(color)[source]

Sets a color for the application title.

Return type:

DataApp

Args:

color (str): The color to set for the title (e.g., “red”, “#FF5733”).

Returns:

DataApp: The current instance of the DataApp, allowing method chaining.