/gcf-template

Google Cloud Function Template

Primary LanguagePython

Google Cloud Function Template

python 3.10

Install Python Library

pip install jsonpickle
pip install functions-framework
pip install google-cloud-firestore

Init GCP

gcloud auth login
gcloud config set project PROJECT_ID

# enable service (for new project and only first time)
gcloud services enable run.googleapis.com

# setup key for debugging
export GOOGLE_APPLICATION_CREDENTIALS="/absolute/path/to/gcf-template/function/project-python3/project-000000-000000000000.json"
export GCP_PROJECT="project-000000"

Debug

./debug.sh

Deploy

./deploy.sh