Flask is a Python micro framework for building web applications.
terminal
git
python3
- Clone this repository
- Change directory
- Create new
virtualenv
- Activate
virtualenv
- Install required Python packages (into the
virtualenv
) - Run
Flask
application - Access service via
HTTP
- Fun&Freizeit
git clone https://github.com/cbwham/training-flask.git
cd training-flask
python -m venv .venv
.venv\Scripts\activate.bat
pip install -U -r requirements.txt
flask run
Just the activation of the virutalenv is different:
. .venv/bin/activate # https://linuxize.com/post/
To begin please install the Azure CLI
and succeed to logging in:
az login
Please read the according documentation first!
az webapp up --location germanywestcentral --name cbwham-training-flask --runtime PYTHON:3.11 --sku B1 --generic-configurations '{"healthCheckPath": "/healthcheck"}' --only-show-errors
Note: name
needs to be unique Azure-wide!
{
"URL": "http://cbwham-training-flask.azurewebsites.net",
"appserviceplan": "office_asp_3158",
"location": "germanywestcentral",
"name": "cbwham-training-flask",
"os": "Linux",
"resourcegroup": "office_rg_5180",
"runtime_version": "PYTHON|3.11",
"runtime_version_detected": "-",
"sku": "BASIC",
"src_path": "//Users//gretel//Sync//code//cbwham//training-flask"
}
According to the output the web application should now be reachable at: