© The Chancellor, Masters and Scholars of The University of Oxford. All rights reserved.
This course is available for multiple cloud providers. Choose your preferred platform:
- Hello Google Cloud
- Hello Microsoft Azure
- Hello Amazon Web Services (⭐ Most popular)
- Hello Oracle Cloud (Coming Soon)
Note: Entries marked with "Coming Soon" are planned versions that are currently under development.
Step 4. Select "Continuously deploy from a repository (source or function)" then "Set up with Cloud Build"
Step 6. Select the "Google Cloud's buildpacks" option. Leave all the parameters empty: Cloud Run will figure out on its own that you are using Python.
Step 7. Select the region (europe-west2 in this case), allow unauthenticated invocations, allow internet traffic, then press Create
You can commit some changes to your repository and watch how the service is updated automatically.
Add the following code in app.py
@app.route("/hello_api")
def hello_api():
return {
"name": "Wrinkle Five Star",
"species": "Duck",
"breed": "American Pekin",
"hatching_date": "2020-09-09",
"sex": "Male"
}
Then test your endpoint
Go to the Google Cloud Console and type "SQL" in the search bar
Missing contentGo to the Google Cloud Console and type "buckets" in the search bar
Missing contentAfter a while, it's not fun anymore to wait for deployment. You want to test your changes before.
Step 1. Install git and clone the repository on your local machine
git clone {repository_link}
Step 2. Install Python
https://www.python.org/downloads/
Step 3. Install dependencies
py -m pip install flask
Step 4. Run flask
py -m flask run
Open localhost:5000 in your browser.