First, generate virtual venv:
Run:
python3 -m venv env
Start virtual venv:
source env/bin/activate
Install the required dependencies:
pip install -r requirements.txt
Install the required dependencies for tests:
pip install -r requirements-test.txt
python3 -m unittest imdb_service_request_test.py
Run:
functions-framework --target=init_scraping
Open http://localhost:8080/ in your browser
Run:
gcloud functions deploy init_scraping --runtime python39 --trigger-http --allow-unauthenticated
Run:
gcloud functions deploy init_scraping --update-env-vars GOOGLE_CLOUD_PROJECT=<project_id>
Run:
gcloud pubsub topics create scraping_pagination_topic
run:
gcloud functions deploy scraping_pagination --runtime python39 --trigger-topic scraping_pagination_topic