librelist archives

« back to archive

Share db models over applications

Share db models over applications

From:
Christoph Heer
Date:
2011-07-14 @ 09:36
Hi,

I work on a project, which has two flask application. The first is a
normal website and the second is an api both use the same mongodb. At
the moment I use the normal pymongo driver to make changes but now I
want to transfer this operations into a mongokit models. Both
applications should use the same models but what is the best way to
share these models to the both applications?

My first idea is to make a sub repository (both applications are
versioned with mercurial) of the application/models folder. The second
is to create an own repository and install this over pip into the
virtualenv of the applications.

Have someone tips and ideas for my problem?

Best regards
Christoph