Skip to content

Taipy.gui.get module name from state

Get the module name that triggered a callback.

Pages can be defined in different modules yet share callbacks declared elsewhere (typically, the application's main module).

This function returns the name of the module where the page that holds the control that triggered the callback was declared. This lets applications implement different behaviors depending on what page is involved.

This function must be called only in the body of a callback function.

Parameters:

Name Type Description Default
state State

The State instance, as received in any callback.

required

Returns:

Type Description
t.Optional[str]

The name of the module that holds the definition of the page containing the control that triggered the callback that was provided the state object.