Giter Site home page Giter Site logo

anders-kiaer / webviz-config Goto Github PK

View Code? Open in Web Editor NEW

This project forked from equinor/webviz-config

0.0 1.0 0.0 1.94 MB

Make Dash applications from a user-friendly config file :book: :snake:

Home Page: https://github.com/orgs/equinor/projects/24

License: MIT License

Python 93.37% CSS 3.68% HTML 0.28% Jinja 2.66%

webviz-config's Introduction

Democratizing Python web applications

Total alerts Language grade: Python


Writing a Dash web application gives a lot of flexibility, however, it also requires 🐍 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 🔒 strict security headers and CSP settings, giving an rating of A+ on e.g. Mozilla observatory. It also facilitates a 🐳 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 📖 configuration file following the yaml standard.
  2. Webviz™ reads the configuration file and automatically writes the corresponding 🐍 Python code.
  3. The created application can be viewed locally, or deployed using 🐳 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 [email protected]:equinor/webviz-config.git
cd ./webviz-config
npm ci --ignore-scripts
# NOTE: If you are on Windows, make sure to first set `npm`'s default `script-shell` to `powershell` by running
# npm config set script-shell powershell
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.

webviz-config's People

Contributors

anders-kiaer avatar antoneskov avatar asnyv avatar dansava avatar dependabot[bot] avatar hanskallekleiv avatar izzy-el avatar joakimjohansen avatar jorgenherje avatar mhwaage avatar pinkwah avatar robpoll avatar rubenthoms avatar sigurdp avatar soofstad avatar thezultimate avatar vantaka2 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.