Background
I am currently working on a web project in python that is hosted on AWS Elasticbeanstalk. We have two deploy-able web apps. A front end flask application and a back end flask application. Structurally The two are in the same git repository but for deployment each is git archived separately to produce a .zip which can be published to the server.
--project/
--front/
--back/
Both modules of the solution need to communicate with a database. I chose to use the ORM sqlalchemy for this. This ORM allows me to create models (python classes) which represent the tables in my database.
ISSUE
My Issues is this. I need to be able to use the models in both modules. Currently I have copies of the files which hold the models in each sub folder. This can lead to a lot of issues in keeping the files synced but also adds a lot of duplicate code in my repository. I was hoping that someone with more experience then myself would be able to describe a better solution.