Skip to content

Package: taipy.gui

Taipy Graphical User Interface generator

The Taipy GUI package provides User Interface generation based on page templates. It can run a Web server that a Web browser can connect to.

The pages are generated by a Web server that allows Web clients to connect, display and interact with the page content through visual elements.

Each page can contain regular text and images, as well as Taipy controls that are typically linked to some value that is managed by the whole Taipy application.

Here is how you can create your first Taipy User Interface:

  • Create a Python source file. Copy these two lines into a file called taipy_app.py.
    from taipy import Gui
    Gui("# Hello Taipy!").run()
    
  • Install Taipy:
    pip install taipy
    
  • Run your application:
    python taipy_app.py
    

Your browser opens a new page, showing the content of your graphical application.

Optional packages

There are Python packages that you can install in your environment to add functionality to Taipy GUI:

  • python-magic: identifies image format from byte buffers so the image control can display them, and so that file_download can request the browser to display the image content when relevant.
    You can install that package with the regular pip install python-magic command (then potentially pip install python-magic on Windows), or install Taipy GUI using: pip install taipy-gui[image].
  • pyarrow: can improve the performance of your application by reducing the volume of data transferred between the Web server and the clients. This is relevant if your application uses large tabular data.
    You can install that package with the regular pip install pyarrow command, or install Taipy GUI using: pip install taipy-gui[arrow].
  • simple-websocket: enables the debugging of the WebSocket part of the server execution.
    You can install that package with the regular pip install simple-websocket command, or install Taipy GUI using: pip install taipy-gui[simple-websocket].
  • pyngrok: enables use of Ngrok to access Taipy GUI application from the internet.
    You can install that package with the regular pip install pyngrok command, or install Taipy GUI using: pip install taipy-gui[pyngrok].

Functions

Classes

  • Gui: Entry point for the Graphical User Interface generation.
  • Html: Page generator for HTML text.
  • Icon: Small image in the User Interface.
  • Markdown: Page generator for Markdown text.
  • Page: Generic page generator.
  • Partial: Re-usable Page content.
  • State: Accessor to the bound variables from callbacks.