Requisitos de software previamente instalado:
- Python 3.5
- Python PIP
En caso de usar el servicio en python:
$ sudo pip install virtualenv
$ virtualenv -p python3 <<nombre_ambiente>>
$ cd <<nombre_ambiente>>
$ source bin/activate
Arrancar aplicación con servidor Werkzeug:
$ cd <<carpeta-proyecto>>
$ pip install -r requirements.txt
$ python app.py
Arrancer aplicación con servidor GreenUnicorn:
$ cd <<carpeta-proyecto>>
$ pip install -r requirements.txt
# Sin logs ni reload
$ gunicorn app:APP -w 6 -b 0.0.0.0:3000
# Con logs y reload
$ gunicorn app:APP -w 6 -b 0.0.0.0:3000 --reload --access-logfile -
$ pylint <archivo>.py --reports=yes
$ pylint **/*.py --reports=yes
https://www.googleapis.com/oauth2/v1/userinfo
{
"id": "7891273891273891273",
"email": "xyz@gmail.com",
"verified_email": true,
"name": "alkdjfa asdlfkjasdklf",
"given_name": "alkdjfa",
"family_name": "asdlfkjasdklf",
"picture": "https://lh3.googleusercontent.com/a-/AOh14GhaGAqhpkQfOw3DRemDILu_0aq2eTvfZdkGmRVe",
"locale": "es"
}
Migraciones con DBMATE - accesos:
$ dbmate -d "db/migrations" -e "DB" new <<nombre_de_migracion>>
$ dbmate -d "db/migrations" -e "DB" up
$ dbmate -d "db/migrations" -e "DB" new <<nombre_de_migracion>>
$ dbmate -d "db/migrations" -e "DB" up
$ dbmate -d "db/migrations" -e "DB" rollback
Fuentes: