Minor improvements including consistently setting override to True when loading dotenv
This commit is contained in:
@@ -16,3 +16,14 @@ def hello() -> str:
|
||||
data = response.json()
|
||||
city, region, country = data['city'], data['region'], data['country']
|
||||
return f"Hello from {city}, {region}, {country}!!"
|
||||
|
||||
# New - added thanks to student Tue H.!
|
||||
|
||||
@app.function(image=image, region="eu")
|
||||
def hello_europe() -> str:
|
||||
import requests
|
||||
|
||||
response = requests.get('https://ipinfo.io/json')
|
||||
data = response.json()
|
||||
city, region, country = data['city'], data['region'], data['country']
|
||||
return f"Hello from {city}, {region}, {country}!!"
|
||||
|
||||
Reference in New Issue
Block a user