Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 566 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 566 Bytes

Python 3 Google Cloud Function Demo

Local

Create a virtual environment for your python function(s).

$ mkvirtualenv -a $PWD -p `which python3` py3cloundfunc

Install dependencies locally

$ pip install -r requirements.txt

Run the app

$ python main.py

View it in the browser

$ open http://localhost:8080

Manual Deployment

Deploy it

$ gcloud functions deploy hello_pubsub --runtime python37 --trigger-resource TOPIC_NAME --trigger-event google.pubsub.topic.publish