This repository contains examples of how to use the Glue42 Dash library. For convenience, the setup is created with pure Python. Each example is individually separated and logically grouped in a folder.
For more information on how to use the Glue42 Dash library, see the official documentation.
-
Use the Python >= 3.7. You can use pyenv to easily manage Python versions on your machine.
-
Setup and activate Python virtual environment in the root folder (more detailed instructions on how to setup Dash can be found here):
python -m virtualenv venv
# Unix
source venv/Scripts/activate
# Windows
.\venv\Scripts\activate.bat
- Install required packages:
pip install -r requirements.txt
# Unix
source venv/Scripts/activate
# Windows
.\venv\Scripts\activate.bat
-
Setup and active the virtual environment.
-
Basic examples contain one or more Dash or JavaScript applications. There is also an
index.html
to help preview the applications in Glue42 Core. Go to an example folder (e.g./interop/register-invoke-method
) and run the following:
# Unix
export FLASK_ENV=development
export FLASK_APP=run.py
# Windows
set FLASK_ENV=development
set FLASK_APP=run.py
python -m flask run
To view an example running in Glue42 Core environment, open http://localhost:5000 in your browser.
To run the applications of an example in a Glue42 Enterprise environment, make sure you have Glue42 3.9 (or later) installed. Add the apps-config.json
file located in the example folder to your application configuration files. Launch the applications from the Glue42 Toolbar.
In these examples, the Dash Dev Tools features are turned off.
You can easily enable them by executing app.enable_dev_tools()
on the app instance.