Ubuntu :
- install
python3-virtualenv
:sudo apt install python3-virtualenv
Debian :
- install
python3-pip3
:sudo apt install python3-pip
- install
virtualenv
with easy_instal :sudo easy_install3 virtualenv
In the root directory of the projet create the new env : virtualenv -p python3 env
. It will create a new directory named env
with all you need to start coding.
Enable virtual env : source env/bin/activate
Install Python modules : pip3 install -r requirements.txt
- install MySQL :
sudo apt install mysql-client mysql-server
- create database :
CREATE DATABASE youtube;
- create youtube user :
CREATE USER 'youtube'@'localhost' IDENTIFIED BY 'youtube';
(In case of error : ) - grant all privileges to youtube user for youtube DB :
GRANT ALL PRIVILEGES ON *.* TO 'youtube'@'localhost';
- insert data :
mysql -u youtube youtube < resources/database.sql
- ???
- start coding
youtube/youtube.py
This one uses MySQL instead of SQLite3 https://www.roytuts.com/python-rest-api-crud-example-using-flask-and-mysql/