Skip to content

An example of using Flask + Altair + Vue JS + Vuetify for data visualization dashboard

License

Notifications You must be signed in to change notification settings

xujiboy/flask-altair-vuejs-vuetify-example

 
 

Repository files navigation

Flask-Altair-VueJs-Vuetify Example

An demonstration of data-visualization web app with basic dashboard UI

Flask Logo Altair logo Vue Logo Vuetify Logo

Intro

This example is built upon Gui Talarico's Flask-Vuejs-Template with additional inspirations from these following online resources:

Features

Demo

Live Demo

Repo Structure and Usage

The details on the directory structure and usage can be found in the README.md file of Gui Talarico's repo. For reader's convenience, here I will only copy and paste the key files and some basic installation instructions below.

Key Files

Location Content
/app Flask Application
/app/api Flask Rest Api (/api)
/app/client.py Flask Client (/)
/src Vue App .
/src/main.js JS Application Entry Point
/public/index.html Html Application Entry Point (/)
/public/static Static Assets
/dist/ Bundled Assets Output (generated at yarn build

Installation

Before you start

Before getting started, you should have the following installed and running:

Template and Dependencies
  • Clone this repository:

     $ git clone [email protected]:xujiboy/flask-vega-vuejs-vuetify-example.git
    
  • Setup virtual environment, install dependencies, and activate it:

     $ pipenv install --dev
     $ pipenv shell
    
  • Install JS dependencies

     $ yarn install
    

Development Server

Run Flask Api development server:

$ python run.py

From another tab in the same directory, start the webpack dev server:

$ yarn serve

The Vuejs application will be served from localhost:8080 and the Flask Api and static files will be served from localhost:5000.

The dual dev-server setup allows you to take advantage of webpack's development server with hot module replacement.

Proxy config in vue.config.js is used to route the requests back to Flask's Api on port 5000.

If you would rather run a single dev server, you can run Flask's development server only on :5000, but you have to build build the Vue app first and the page will not reload on changes.

$ yarn build
$ python run.py

Production Server and Heroku Deployment

Please refer to the README.md file of Gui Talarico's repo.

About

An example of using Flask + Altair + Vue JS + Vuetify for data visualization dashboard

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 43.3%
  • Python 33.4%
  • JavaScript 19.4%
  • HTML 3.9%