Marc
Marc

Reputation: 2083

Sharing code between two GCP python Cloud functions

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

Answers (2)

guillaume blaquiere
guillaume blaquiere

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

al-dann
al-dann

Reputation: 2725

Never tried by myself, but based on documentation, that may be the only feasible way:

Using private dependencies

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

Related Questions