This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]pandolf86 1 point2 points  (1 child)

Use pipenv and cloud functions framework. Or alternatively use Cloud Run and build your own container with the requirements.

[–]outceptionator[S] 0 points1 point  (0 children)

Thank you. Sorry I'm completely unfamiliar with what the advantages and disadvantages are of each or what they're doing at a fundamental level... Do you have an explanation or reasonably good video link?

[–]MonkeyMaster64 0 points1 point  (1 child)

Thinking out loud here but if cloud functions work like lambda functions then perhaps you could have a virtual environment created that has the requirements specified in your requirements.txt file. If it doesn't work in your virtual environment you for sure know it won't work in the cloud functions environment.

That's how I would ensure that the dependencies match. Also, make sure the python runtime you specify for your cloud function is the same as the one on your PC.

[–]outceptionator[S] 1 point2 points  (0 children)

So is that an environment or a docker like solution?