Skip to main content

Configuration file support for webviz

Project description

Democratizing Python web applications

Total alerts Language grade: Python


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. webviz-subsurface.

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 Python, and want to create generic or specialized dashboards you or other users can reuse by simply asking for it in the Webviz™ configuration file. This can be done without knowing JavaScript (see also Dash for more information).
  • 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:

  1. The user provides a :book: configuration file following the yaml standard.
  2. Webviz™ reads the configuration file and automatically writes the corresponding :snake: Python code.
  3. The created application can be viewed locally, or deployed using :whale: Docker to a cloud provider. Both out of the box.

technical_drawing


Installation

The recommended and simplest way of installing webviz-config is to run

pip install 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 git@github.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 example configuration file,

webviz build ./examples/basic_example.yaml

Without any additional arguments, this will

  1. create a temporary folder
  2. write the Python application code to that folder
  3. 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

webviz --help

Usage

See the introduction page for information on how you create a 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.

License

webviz-config is, with a few exceptions listed below, MIT licensed.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webviz-config-0.3.3rc0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webviz_config-0.3.3rc0-py3-none-any.whl (559.8 kB view details)

Uploaded Python 3

File details

Details for the file webviz-config-0.3.3rc0.tar.gz.

File metadata

  • Download URL: webviz-config-0.3.3rc0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for webviz-config-0.3.3rc0.tar.gz
Algorithm Hash digest
SHA256 5ec0f9848a0eac6792d82be4a724ce43d893f4d401e5242a1567a93fb5b2e6d3
MD5 f40345975b54f422d836f96813e4a58a
BLAKE2b-256 41bb478a00d201c3111fb6b6fe891542014f0a7676f82acaf4a9799db2a2e058

See more details on using hashes here.

File details

Details for the file webviz_config-0.3.3rc0-py3-none-any.whl.

File metadata

  • Download URL: webviz_config-0.3.3rc0-py3-none-any.whl
  • Upload date:
  • Size: 559.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for webviz_config-0.3.3rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 beac76809c82fe3689071539dd4a76706b74707e4c18907732e587de153a8fd6
MD5 8533c3bc62452419c70e0c1e9d17c0d3
BLAKE2b-256 8f2aebbe2b706b2e95219196fd4ef154ba8969a29badb384678fee2a4a6dd69d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page