Flask - Part 0 - Intro
20 Sep 2018 · 2 min read
Welcome
Welcome to the flask course !
This (quite big) flask course will teach you how to build a REST API using flask micro-framework
.
Before we continue, I’ll assume that, you have followed my previous course : setting up your python environment and that you know how to code in python3 (object oriented too).
You should have python3
, pip
, virtualenv
and git
installed.
1 - Creating our environment
In order to easily manage every parti of this course, let’s create a dedicated folder.
mkdir flask_learning
cd flask_learning
flask_learning
will be your main folder.
Let’s now grab a copy of every part of this course.
# assuming you are in flask_learning
git clone https://github.com/gmolveau/flask_cybermooc
You now have the flask_cybermooc
folder with every version that we will see during this course.
2 - Other things
In every sub-folders of flask_learning/flask_cybermooc
, you will find a run.sh
file.
This file is here to help you launch the reference app so you can quickly correct your code if it’s not working. This script has 4 functions : clean, setup, run, test
.
If you want to launch the code, you simply need to call :
# assuming you're in flask_learning/flask_cybermooc/version_XXX
sh run.sh clean
sh run.sh setup
sh run.sh run
sh run.sh test
3 - Every part
Here’s the list of every part of this course :
- part 1 - Super Basic Flask app
- part 2 - Architecture of a Flask app
- part 3 - Connecting Flask with a database
- part 4 - Adding users and login/signup routes
- part 5 - User authentication with Json Web Token
- part 6 - Roles management
- part 7 - Restricting access with role verification
- part 8 - Implementing JWT whitelisting
- part 9 - Revoking JWT
- part 10 - Example of a (complete) Flask app + Docker
Conclusion
Now that everything is set-up, let’s begin with our first part of this course and build a dead-simple flask app.