Context
I have a local folder containing multiple Python Flask applications and a commons python package. As you can see I have created a virtualenv for each of the Flask applications, because I would like to deploy to AWS Lambda using Zappa and want to include only the relevant dependencies in the package zip that goes to AWS.
project_folder/
+-- commons/
| +-- __init__.py
| +-- setup.py
| +-- module1.py
+-- application1/
| +-- __init__.py
| +-- app.py
| +-- env/
+-- application2/
| +-- __init__.py
| +-- app.py
| +-- env/
Problem
I am not able to include the commons
package in the Flask applications. I assume this has to do because it is collateral and not a subdirectory.
- I would like to avoid adding a copy into each Flask application.
- I do not want to create the whole project into one gigantic package because it will get too large for AWS Lambda
Question
How can I make sure the commons
package is included when I call zappa deploy
from inside project_folder/application1/
?