Description: Post a cloud function that takes in a string of numbers and returns and returns a json file that contains the sum of all of the single digit numbers.
Example:
- Input:
12345 - Output:
{"answer": 15}
Do a GET request to your cloud function with a input 012937, 2 and 9999999999999.
Add your professor as a collaborator to your cloud function via the IAM page.
Create new conda environment.
conda create --my-first-gcf --clone baseThen, activate the new environment:
conda activate my-first-gcfNow, install the required packages:
pip install functions-framework flaskMove to this folder and run:
functions-framework --target first_cloud_function --debugThen run the testing script in ./test/first_function.py
python ./test/first_function.py