digitalocean / sample-functions-python-sendgrid-email

Sending emails via Sendgrid API
16 stars 27 forks source link

Multiple functions within an App share same utilities. #7

Open hammadarshad1 opened 11 months ago

hammadarshad1 commented 11 months ago

Is there a way for multiple functions within the DO (DigitalOcean) App to share the same utils/constants and requirements file?

The issue I'm facing is that every time I create a new function, I have to redefine all the constants, package requirements, and even the build.sh file. This repetition is becoming cumbersome for me.

Here is my folder structure:

image
rabbah commented 11 months ago

You could try using a shared lib directory https://docs.digitalocean.com/products/functions/reference/build-process/

codespearhead commented 8 months ago

@hammadarshad1 Did the above solution work? If so, can you close this issue?