Skip to content

taipy.gui.builder.Page

Bases: _Renderer

Page generator for the Builder API.

This class is used to create a page created with the Builder API.
Instance of this class can be added to the application using Gui.add_page().

This class is typically be used as a Python Context Manager to add the elements.
Here is how you can create a single-page application, creating the elements with code:

from taipy.gui import Gui
from taipy.gui.builder import Page, button

def do_something(state):
    pass

with Page() as page:
    button(label="Press me", on_action=do_something)

Gui(page).run()

__init__(element=None, **kwargs)

Initialize a new page.

Parameters:

Name Type Description Default
element *Element*

An optional element, defined in the taipy.gui.builder module, that is created in the page.
The default creates a part where several elements can be stored.

None