A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/anychart-integrations/python-flask-mysql-template below:

anychart-integrations/python-flask-mysql-template: This example shows how to use Anychart library with the Python programming language, Flask microframework and MySQL database.

Python Flask basic template

This example shows how to use Anychart library with the Python programming language, Flask microframework and MySQL database.

To use this sample you must have Python 2.* installed (if not please visit python download page), PIP - Python package manager (if not please check isntallation guide) and MySQL installed and running (if not please check out MySQL download page and follow instructions)

To check your installations, run the following command in the command line:

$ python --version
Python 2.7.6 # sample output
$ pip -V
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7) # sample output
$ mysql --version
mysql  Ver 14.14 Distrib 5.5.52, for debian-linux-gnu (x86_64) using readline 6. # sample output

To start this example run commands listed below.

Clone the repository from github.com:

$ git clone git@github.com:anychart-integrations/python-flask-mysql-template.git

Navigate to the repository folder:

$ cd python-flask-mysql-template

Install dependencies:

$ pip install --user Flask
$ pip install --user MySQL-python
# if you have some problems installing MySQL-python, probably you should install libmysqlclient-dev or/and python-dev:
# sudo apt-get install libmysqlclient-dev
# sudo apt-get install python-dev
# Or you can just run:
# sudo apt-get install python-mysqldb

Set up MySQL database, use -u -p flags to provide username and password:

$  mysql < database_backup.sql

Run example:

Open browser at http://127.0.0.1:5000/

Your workspace should look like:

python-flask-mysql-template/
    static/
        css/
            style.css       # css style
    templates/
        index.html          # html template
    app.py                  # main Python app code
    database_backup.sql     # MySQL database dump
    README.md
    LICENSE

Language - Python
Web framework - Flask
Html tepmlate - Jinja 2
Database - MySQL

AnyChart Python/Flask/MySQL integration sample includes two parts:

If you have any questions regarding licensing - please contact us. sales@anychart.com


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4