Demo Applation of Flask Using Python3.7
sudo apt install mysql-server
sudo apt install redis
sudo apt install memcached
2.create isolated python environments
# use virtualenv
pip install -r requirements.txt
# use conda
conda env create -f alita.yaml
# use uWsgi
uwsgi config/alita/uwsgi.ini
# use gunicorn
gunicorn -c config/alita/gunicorn.py gunicon_server:application
# directly
python cmd.py runserver -p 15000
# clean .pyc .pyo
python cmd.py clean
# show all urls
python cmd.py urls
# init app
python cmd.py init
# test
python cmd.py runserver -p 8000
# response
{
code: "0000",
data: {},
message: "", # error message
}
# code
"0000" # OK
"2000" # DBERR
"2001" # THIRDERR
"2002" # DATAERR
"2003" # IOERR
"2100" # LOGINERR
"2101" # PARAMERR
"2102" # USERERR
"2103" # ROLEERR
"2104" # PWDERR
"2105" # VERIFYERR
"2200" # REQERR
"2300" # NODATA
"2400" # UNKOWNERR
- reids
- memcache
- SQLAlchemy
- casbin
- Flask-Login
- Flask-JWT
- uWSGI
- Flask-Script
- CSRFProtect