O'Reilly logo

Highcharts Cookbook by Nicholas Terwoord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Flask/Bottle as a data provider

Many different micro frameworks have emerged to tackle small, specific problems that developers may have. In the Python world, there are two prominent examples: Flask and Bottle. Flask and Bottle are very similar, and so in this recipe, we examine how we can use either as a data provider for Highcharts.

Getting ready

First, we will need to set up Python using the following steps:

  1. Download and install Python 2.7 (http://www.python.org/getit/).
  2. Download and install Flask (http://flask.pocoo.org).
  3. Download and install Bottle (http://bottlepy.org/).
  4. Create a folder flask_bottle for our project.
  5. Create a file flask_bottle/bower.json to list our JavaScript dependencies. The dependencies are as follows:
    { "name": "highcharts-cookbook-chapter-8", ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required