Pyramid Web Development Libraries - Dash Framework



In this chapter, we will discuss about the Dash framework in detail.

Dash is an open-source Python framework used for building analytical web applications. It is a powerful library that simplifies the development of data-driven applications. Its especially useful for Python data scientists who arent very familiar with web development. Users can create amazing dashboards in their browser using dash.

Built on top of Plotly.js, React, and Flask, Dash ties modern UI elements like dropdowns, sliders and graphs directly to your analytical python code.

Dash apps consist of a Flask server that communicates with front-end React components using JSON packets over HTTP requests.

Dash applications are written purely in python, so NO HTML or JavaScript is necessary.

Dash Setup

If Dash is not already installed in your terminal, then install the below mentioned Dash libraries. As these libraries are under active development, install and upgrade then frequently. Python 2 and 3 are also supported.

Install Dash Core Backend

pip3 install dash 
Collecting dash
  Downloading dash-4.0.0-py3-none-any.whl.metadata (11 kB)
...
Installing collected packages: zipp, retrying, narwhals, plotly, importlib-metadata, dash
Successfully installed dash-4.0.0 importlib-metadata-8.7.1 narwhals-2.18.0 plotly-6.6.0 retrying-1.4.2 zipp-3.23.0

Install Dash Core Frontend

pip3 install dash-renderer 
Collecting dash-renderer
  Downloading dash_renderer-1.9.1.tar.gz (1.0 MB)
  ...
Installing collected packages: dash-renderer
Successfully installed dash-renderer-1.9.1

Install Dash HTML Components

pip3 install dash-html-components
Collecting dash-html-components
  Downloading dash_html_components-2.0.0-py3-none-any.whl.metadata (3.8 kB)
  ...
Installing collected packages: dash-html-components
Successfully installed dash-html-components-2.0.0

Install Dash Supercharged Components

pip3 install dash-core-components
Collecting dash-core-components
  Downloading dash_core_components-2.0.0-py3-none-any.whl.metadata (2.9 kB)
  ...
Installing collected packages: dash-core-components
Successfully installed dash-core-components-2.0.0

Install Plotly graphing library

pip3 install plotly
Requirement already satisfied: plotly in .\Lib\site-packages (6.6.0)
Requirement already satisfied: narwhals>=1.15.1 in .\Lib\site-packages (from plotly) (2.18.0)
Requirement already satisfied: packaging in .\Lib\site-packages (from plotly) (25.0)
Advertisements