flask
flask-smorest
flask-sqlalchemy
docker build -t IMAGE_NAME .
: Builds Docker image.
- WINDOWS:
docker run -dp 5000:5000 -w /app -v "/c/LOCAL_PATH_TO_PROJECT_FOLDER/flask-workshop:/app" IMAGE_NAME sh -c "flask run --host 0.0.0.0"
: Run Docker container with hot reloading. - LINUX:
docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run --host 0.0.0.0"
: Run Docker container with hot reloading.
- API should work! Use Postman to test.
Edit app.py
such that when running command flask run
, the browser will show "Hello world!".
- Post, get and delete endpoints
- Database connection
- Swagger documentation
- Add post, get and delete endpoints
- Model relationships
- API key (simplest approach)
- OAuth2.0 OpenID Connect with Azure AD
- Generate JSON Web Token (JWT) with Postman (authorize using Azure AD application)
- Use token to authenticate