Sakila Demo
Flask web app demonstrating database programming using the MySQL sakila example database
Requirements
-
Python 3, which I recommend getting through Miniconda -- remember to get the Python 3.5 version! Then at your command line do:
$ conda install python pip flask pymysql
-
This app uses
flask_bootstrap
andflask_wtf
, the latest versions of which are not available from conda, so you'll need to get them withpip
:$ pip install flask-bootstrap $ pip install flask-wtf
-
And, of course, MySQL.
Running
- Start your MySQL server (if necessary, mainly on OS X).
- Clone this repository.
cd
to thesakila-demo
directory- Run
python sakila_demo.py
.
Learning
Of course you need to know Python and MySQL. The new stuff for most students will be:
- The Python DB-API and PyMySQL's implementation of it.
- The Flask web application framework.
- The Bootstrap web front end framework.
- You'll need at least a firm grasp of HTML. Knowledge of CSS and JavaScript are also helpful but not essential. You can learn these at Mozilla Developer Network.