### Install and Build Taipy GUI Front-end Source: https://github.com/avaiga/taipy/blob/develop/frontend/taipy-gui/README.md Run these commands in the `frontend/taipy-gui` directory to install dependencies and build the front-end bundle. Ensure Node.js v18+ is installed. ```bash # Current directory is the directory where this README file is located: # [taipy-dir]/frontend/taipy-gui # # Install the DOM dependencies (once and for all) cd dom npm i cd .. # Install the web app dependencies npm i # Build the web app and all elements npm run build ``` -------------------------------- ### Setup Pipenv Environment for Development Source: https://github.com/avaiga/taipy/blob/develop/taipy/common/INSTALLATION.md Install Pipenv and then set up the development environment, including all necessary packages for development and testing of Taipy Common. ```bash pip install pipenv ``` ```bash pipenv install --dev ``` -------------------------------- ### Install Development Packages and Run Tests with Pipenv Source: https://github.com/avaiga/taipy/blob/develop/CONTRIBUTING.md Use this command to install development dependencies and verify your setup by running tests. ```bash pipenv install --dev pipenv run pytest ``` -------------------------------- ### Install uWSGI and Run Taipy-REST Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Installs the uWSGI server and runs the Taipy-REST application using uWSGI. ```bash pip install uwsgi uwsgi --http 127.0.0.1:5000 --module myapi.wsgi:app ``` -------------------------------- ### Install Build Package Source: https://github.com/avaiga/taipy/blob/develop/doc/gui/extension/README.md Install the 'build' package, which is required for packaging Python libraries. ```bash pip install build ``` -------------------------------- ### Install Latest Taipy GUI Release Source: https://github.com/avaiga/taipy/blob/develop/taipy/gui/package_desc.md Use pip to install the latest stable release of Taipy GUI. This is the simplest way to get started. ```bash pip install taipy-gui ``` -------------------------------- ### Install Taipy GUI Extension Module Source: https://github.com/avaiga/taipy/blob/develop/frontend/taipy-gui/extension-index.md Install the Taipy GUI Extension module using npm. Replace with the actual installation path of the Taipy GUI Python package. ```bash npm i /taipy/gui/webapp ``` -------------------------------- ### Install Node.js Dependencies Source: https://github.com/avaiga/taipy/blob/develop/doc/gui/extension/README.md Run this command in the `example_library/front-end` directory to install necessary Node.js packages. Ensure the TAIPY_DIR environment variable is set correctly. ```bash npm install ``` -------------------------------- ### Install and Configure Pre-commit Hooks Source: https://github.com/avaiga/taipy/blob/develop/CONTRIBUTING.md Install the pre-commit tool and set up the hooks to automatically format code and check for typing errors before each commit. ```bash pipenv install pre-commit pipenv run python -m pre-commit install ``` -------------------------------- ### Install Development Dependencies and Run Tests Source: https://github.com/avaiga/taipy/blob/develop/taipy/gui/INSTALLATION.md Install Pipenv and development packages, then run Taipy GUI tests. ```bash pip install pipenv pipenv install --dev ``` ```bash pipenv run pytest tests/gui ``` -------------------------------- ### Install Dependencies and Build Taipy Front-end Source: https://github.com/avaiga/taipy/blob/develop/frontend/taipy/README.md Run these commands in the `frontend/taipy` directory to install dependencies and build the Taipy front-end bundle. This process generates code for Taipy visual elements used in Scenario Management. ```bash # Current directory is the directory where this README file is located: # [taipy-dir]/frontend/taipy # npm i # Build the Taipy front-end bundle npm run build ``` -------------------------------- ### Install libmagic on Mac OS M1 Source: https://github.com/avaiga/taipy/blob/develop/CONTRIBUTING.md On Mac OS M1, install the libmagic library before proceeding with Taipy development setup. This ensures compatibility for certain functionalities. ```bash brew install libmagic pip install python-libmagic ``` -------------------------------- ### Install Taipy using Pipenv Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Install Taipy within a Pipenv virtual environment. ```console pipenv install taipy ``` -------------------------------- ### Install Gunicorn and Run Taipy-REST Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Installs the Gunicorn WSGI server and runs the Taipy-REST application using Gunicorn. ```bash pip install gunicorn gunicorn myapi.wsgi:app ``` -------------------------------- ### Install Taipy Templates Package Source: https://github.com/avaiga/taipy/blob/develop/taipy/templates/package_desc.md Install the latest stable version of the taipy-templates package using pip. ```bash pip install taipy-templates ``` -------------------------------- ### Install Taipy using Conda Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Use these commands to create and activate a Conda environment, then install Taipy from its GitHub repository. ```console conda create -n conda activate pip install git+https://git@github.com/Avaiga/taipy ``` -------------------------------- ### Build Taipy GUI and Taipy Bundles Source: https://github.com/avaiga/taipy/blob/develop/CONTRIBUTING.md Run these commands from the repository root to build the Taipy GUI and Taipy front-end bundles. Ensure Node.js v18+ is installed. Build the GUI bundle first. ```bash # Build the Taipy GUI bundle cd frontend/taipy-gui cd dom npm i cd .. npm i npm run build # # Build the Taipy front-end bundle cd ../taipy # Current directory is [taipy-dir]/frontend/taipy npm i npm run build ``` -------------------------------- ### Install Taipy Core (Stable) Source: https://github.com/avaiga/taipy/blob/develop/taipy/core/INSTALLATION.md Use this command to install the latest stable version of Taipy Core from pip. ```bash pip install taipy-core ``` -------------------------------- ### Create and Activate Venv for Taipy Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Set up a virtual environment using venv, activate it, and then install Taipy. ```console python -m venv source myenv/bin/activate # On Windows use `\Scripts\activate` pip install taipy ``` -------------------------------- ### Install pip with Conda Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Use this command to install pip within a Conda environment if it's not already present. ```console conda install pip ``` -------------------------------- ### Install Latest Stable Taipy-REST Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Installs the latest stable version of the taipy-rest package using pip. ```bash pip install taipy-rest ``` -------------------------------- ### Install Taipy GUI as Editable Package Source: https://github.com/avaiga/taipy/blob/develop/taipy/gui/package_desc.md Install the Taipy GUI package in editable mode from the root of the repository. This is useful for development. ```bash pip install -e . --user ``` -------------------------------- ### Install Taipy GUI Dependencies Source: https://github.com/avaiga/taipy/blob/develop/taipy/gui/package_desc.md Install Node.js dependencies for the DOM and web app components. These commands are run from the 'gui' and 'gui/dom' directories respectively. ```bash cd gui cd dom npm i ``` ```bash cd .. npm i ``` -------------------------------- ### Create and Activate Conda Environment for Taipy Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Set up a Conda environment, activate it, and then install Taipy using pip. ```console conda create -n conda activate pip install taipy ``` -------------------------------- ### Install Development Version from GitHub with Venv Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Install the development version of Taipy from GitHub after setting up and activating a venv environment. ```console python -m venv myenv source myenv/bin/activate # On Windows use `myenv\Scripts\activate` pip install git+https://git@github.com/Avaiga/taipy ``` -------------------------------- ### Install Specific Taipy Version with Venv Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Install a specific Taipy version after creating and activating a venv environment. ```console python -m venv myenv source myenv/bin/activate # On Windows use `myenv\Scripts\activate` pip install taipy== ``` -------------------------------- ### Install Specific Taipy Version using Pip Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Install a particular version of Taipy by specifying the version number. ```console pip install taipy== ``` -------------------------------- ### Install Development Version from GitHub using Pipenv Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Install the development version of Taipy from GitHub within a Pipenv environment. ```console pipenv install git+https://git@github.com/Avaiga/taipy ``` -------------------------------- ### Install Taipy Stable Release Source: https://github.com/avaiga/taipy/blob/develop/package_desc.md Use this command to install the latest stable version of Taipy using pip. ```bash pip install taipy ``` -------------------------------- ### Install Specific Taipy Version with Conda Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Install a specific Taipy version within a Conda environment. ```console conda create -n conda activate pip install taipy== ``` -------------------------------- ### Run Taipy-REST with Docker Compose Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Starts the Taipy-REST application using Docker Compose. ```bash docker-compose up ``` -------------------------------- ### Install Taipy Development Version from GitHub Source: https://github.com/avaiga/taipy/blob/develop/taipy/common/INSTALLATION.md Install the latest development version of the Taipy package, including taipy-common, directly from the GitHub repository using pip. ```bash pip install git+https://git@github.com/Avaiga/taipy ``` -------------------------------- ### Install Latest Stable Taipy Common Source: https://github.com/avaiga/taipy/blob/develop/taipy/common/INSTALLATION.md Use this command to install the most recent stable release of the taipy-common package from PyPI. ```bash pip install taipy-common ``` -------------------------------- ### Install Specific Taipy Version using Pipenv Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Install a specific version of Taipy within a Pipenv virtual environment. ```console pipenv install taipy== ``` -------------------------------- ### Install Taipy in Google Colab Source: https://github.com/avaiga/taipy/blob/develop/INSTALLATION.md Run this command in a Colab notebook cell to install the latest stable release of Taipy. Remember that Colab environments are ephemeral and require reinstallation after disconnection. ```python !pip install --ignore-installed taipy ``` -------------------------------- ### Import from Taipy GUI Module Source: https://github.com/avaiga/taipy/blob/develop/frontend/taipy-gui/extension-index.md Import necessary items from the 'taipy-gui' module into your JavaScript code after installation. ```javascript import { ... } from "taipy-gui"; ``` -------------------------------- ### Create Heroku App Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Creates a new application on Heroku. ```bash heroku create ``` -------------------------------- ### Run Taipy GUI Extension Demo Source: https://github.com/avaiga/taipy/blob/develop/doc/gui/extension/README.md Execute the main Python script to run the Taipy GUI application demonstrating the extension. ```bash python main.py ``` -------------------------------- ### Create a Taipy Application Source: https://github.com/avaiga/taipy/blob/develop/taipy/templates/README.md Use this command to initiate the creation of a new Taipy application from a template. You can specify a default template or choose another. ```bash taipy create ``` ```bash taipy create --application "default" ``` -------------------------------- ### Push Web Image to Heroku Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Builds the Docker image for the web dyno and pushes it to the Heroku Container Registry. ```bash heroku container:push web ``` -------------------------------- ### Initialize Taipy GUI with FastAPI Server Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui_fastapi.ipynb Initialize the Taipy Gui object, specifying 'fastapi' as the server backend. Then, add the defined page to the GUI. ```python gui = Gui(server="fastapi") gui.add_page("page1", page) ``` -------------------------------- ### Import Taipy GUI and Markdown Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui_fastapi.ipynb Import necessary classes from the taipy.gui library to build the GUI. ```python from taipy.gui import Gui, Markdown ``` -------------------------------- ### Initialize and Add Page to GUI Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui.ipynb Instantiate the Taipy Gui object and add the defined Markdown page to the GUI application. ```python gui = Gui() gui.add_page("page1", page) ``` -------------------------------- ### Build Taipy GUI JavaScript Bundle Source: https://github.com/avaiga/taipy/blob/develop/taipy/gui/package_desc.md Build the JavaScript bundle for the Taipy GUI front-end code. This command is run from the 'gui' directory. ```bash npm run build ``` -------------------------------- ### Build Python Package Source: https://github.com/avaiga/taipy/blob/develop/doc/gui/extension/README.md Use the 'build' module to create an autonomous Python package for the extension library. ```bash python -m build ``` -------------------------------- ### Release Web Image on Heroku Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Releases the pushed web image to make the application live on Heroku. ```bash heroku container:release web ``` -------------------------------- ### Define a Markdown Page Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui_fastapi.ipynb Create a Markdown page with a dynamic variable 'a'. This page will be rendered by the GUI. ```python a = 10 page = Markdown("# Hello\n<|{a}|>") ``` -------------------------------- ### Set Web App Path (Bash) Source: https://github.com/avaiga/taipy/blob/develop/CONTRIBUTING.md Configure the TAIPY_GUI_WEBAPP_PATH environment variable in bash to point to your custom web app location. This avoids reinstalling the package during front-end development. ```bash export TAIPY_GUI_WEBAPP_PATH="/path/to/your/taipy/taipy/gui/webapp" ``` -------------------------------- ### Heroku Container Registry Login Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Logs in to the Heroku Container Registry to prepare for deploying the application. ```bash heroku container:login ``` -------------------------------- ### Dispatch Actions in React Context Source: https://github.com/avaiga/taipy/blob/develop/frontend/taipy-gui/extension-index.md Create and dispatch actions to the React context to notify the backend of changes or query data. This is typically done using the `useDispatch` hook. ```javascript const dispatch = useDispatch(); ... const action = create*Action(...); ... dispatch(action); ``` -------------------------------- ### Run Taipy-REST Locally Source: https://github.com/avaiga/taipy/blob/develop/taipy/rest/INSTALLATION.md Runs the Taipy-REST application locally using the Flask development server. ```bash flask run ``` -------------------------------- ### Build Debug JavaScript Bundle for Taipy GUI Source: https://github.com/avaiga/taipy/blob/develop/taipy/gui/INSTALLATION.md Build the JavaScript bundle with debugging symbols enabled for front-end development and debugging. ```bash npm run build:dev ``` -------------------------------- ### Run Taipy Common Tests with Pipenv Source: https://github.com/avaiga/taipy/blob/develop/taipy/common/INSTALLATION.md Execute the tests for the taipy-common package within the Pipenv virtual environment. ```bash pipenv run pytest tests/common ``` -------------------------------- ### Run Taipy Core Tests Source: https://github.com/avaiga/taipy/blob/develop/taipy/core/INSTALLATION.md Execute the Taipy Core tests using pytest within the Pipenv virtual environment. ```bash pipenv run pytest tests/core ``` -------------------------------- ### Run the Taipy GUI Application Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui_fastapi.ipynb Run the Taipy GUI application. Set 'run_browser' to False to prevent the browser from opening automatically. ```python gui.run(run_browser=False) ``` -------------------------------- ### Set Web App Path (Python) Source: https://github.com/avaiga/taipy/blob/develop/CONTRIBUTING.md Configure the TAIPY_GUI_WEBAPP_PATH environment variable in Python to point to your custom web app location. This avoids reinstalling the package during front-end development. ```python import os os.environ["TAIPY_GUI_WEBAPP_PATH"] = os.path.normpath( "/path/to/your/taipy/taipy/gui/webapp" ) ``` -------------------------------- ### Run Taipy Tests Source: https://github.com/avaiga/taipy/blob/develop/CONTRIBUTING.md Execute the Taipy test suite using pytest within the Pipenv virtual environment. ```bash pipenv run pytest ``` -------------------------------- ### Access and Modify GUI State Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui_fastapi.ipynb Access the current value of the 'a' variable in the GUI's state. Then, update its value to 20. ```python gui.state.a ``` ```python gui.state.a = 20 ``` ```python gui.state.a ``` -------------------------------- ### Access GUI State Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui.ipynb Read the current value of a variable from the GUI's state. ```python gui.state.a ``` -------------------------------- ### Reload the Taipy GUI Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui_fastapi.ipynb Reload the Taipy GUI. This can be useful for applying changes without a full restart. ```python gui.reload() ``` -------------------------------- ### Clone Taipy GitHub Repository Source: https://github.com/avaiga/taipy/blob/develop/taipy/common/INSTALLATION.md Clone the Taipy GitHub repository to your local machine to access the source code for taipy-common and other Taipy packages. ```bash git clone https://github.com/Avaiga/taipy.git ``` -------------------------------- ### Update GUI State Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui.ipynb Modify a variable in the GUI's state, which will reflect the change in the running application. ```python gui.state.a = 20 ``` -------------------------------- ### Stop the Taipy GUI Application Source: https://github.com/avaiga/taipy/blob/develop/tests/gui/notebook/simple_gui_fastapi.ipynb Stop the running Taipy GUI application. This is typically called when the application needs to be shut down. ```python gui.stop() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.