aware-api
Microsoft Hackathon: Azure Series
This repository contains the RESTful Aware's API server.
Tech Stack
- Flask
- Docker
- OpenCV
- Azure Image Recognition
- Azure DevOps
- Azure Container Registry
- Azure App Service
- Azure CosmosDB
The Release Pipeline
Azure DevOps
fetches the latest commit to master from Aware's GitHub repo. It will build and test the source code.- If succesful,
DevOps
will then build a Docker image of the web api and push it to theAzure Container Registry
. - After succesfully releasing the docker image,
DevOps
will deploy the web api viaAzure App Service
. Azure App Services
will fetch the corresponding image from theContainer Registry
and make it available online.- The mobile client can then access Aware's API through the web. `
Starting the API server
- Development
python run.py
- Production
# through Docker docker build -t aware-api . docker run --rm -t -p 8080:8080 aware-api # or through CLI waitress-serve --call 'aware_api:create_app'
- You can now test the api in another terminal
curl -i \ -X POST \ -H "Content-Type: application/json" \ -d '{"id":"42", "picture": "some_base64_str"}' \ localhost:8000/api
- When you are done you can shutdown the api with
ctrl-C