Configuration file support for webviz
Democratizing Python web applications
Writing a Dash web application gives a lot of flexibility, however, it also requires :snake: Python knowledge from the person setting it up.
Webviz™ is a MIT-licensed configuration layer on top of Dash, which encourages making reusable components and dashboards, which can then be added/removed when creating an application using a short
yaml configuration file.
This Python package,
webviz-config, is the core plugin framework. For a real example repository using this plugin system, see e.g.
These are the main user groups targeted by Webviz™:
- You do not know Python, and only want to add different predefined dashboards or visualizations/components in a certain order and/or on different pages in the application. Optionally with some text and mathematical equations (that you provide) inbetween the dashboards, explaining what the user is looking at.
- You know React, and want to create highly specialized visualization which Python or pure config-file users can reuse.
Webviz™ will create web applications with very :lock: strict security headers and CSP settings, giving an rating of A+ on e.g. Mozilla observatory. It also facilitates a :whale: Docker setup, where the Python code can be ran completely unpriviliged in a sandbox (both with respect to file system access and network communication).
Example configuration file and information about the standard plugins can be seen in the documentation.
The workflow can be summarized as this:
- The user provides a :book: configuration file following the yaml standard.
- Webviz™ reads the configuration file and automatically writes the corresponding :snake: Python code.
- The created application can be viewed locally, or deployed using :whale: Docker to a cloud provider. Both out of the box.
The recommended and simplest way of installing
webviz-config is to run
pip install webviz-config
:warning: Unless you are using
>=20.3you should enable the new
pipresolver when installing, i.e.
pip install --use-feature=2020-resolver webviz-config.
If you want to develop
webviz-config and install the latest source code manually you
can do something along the lines of:
git clone email@example.com:equinor/webviz-config.git cd ./webviz-config npm ci --ignore-scripts && npm run postinstall pip install -e .
After installation, there is a console script named
webviz available. You can test the installation by using the provided test
webviz build ./examples/basic_example.yaml
Without any additional arguments, this will
- create a temporary folder
- write the Python application code to that folder
- start a localhost server
When stopping the server (press CTRL+C at any time), the temporary folder is deleted.
The optional arguments can be seen when running
See the introduction page for information on how you
webviz configuration file and use it.
Creating new plugins
If you are interested in creating new plugins which can be configured through the configuration file, take a look at the contribution guide.
To quickly get started, we recommend using the corresponding cookiecutter template.
webviz-config is, with a few exceptions listed below, MIT licensed.
Release history Release notifications | RSS feed
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size webviz_config-0.2.7-py3-none-any.whl (542.6 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size webviz-config-0.2.7.tar.gz (1.1 MB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for webviz_config-0.2.7-py3-none-any.whl