Reputation: 2083
I have two different GCP cloud functions coded in python that would benefit from sharing part of the code, is there any way to reference common code between them?
Upvotes: 1
Views: 1230
Reputation: 75705
You can use Google Artifact Registry to host your own and private pipy registry. Deploy your common code in this registry and use it in your functions dependencies definitions.
Upvotes: 1
Reputation: 2725
Never tried by myself, but based on documentation, that may be the only feasible way:
Another hypothetical option is to use pip
:
Specifying dependencies with pip
but I am not sure that you are ready for such path...
Upvotes: 0