Tuesday 15 May 2012

google app engine - GAE - Including external python modules without adding them to the repository? -


I am currently working on a dragon based Google App Engine project. Specifically, I am using flask for application. I wonder what is the acceptable method of incorporating external python modules, especially when it comes to the repository. From what I can say, in my repository is bad form for many reasons including the code of others. However, others may be working on the same store, so we should use the same external module to insure the same results.

Specifically, I need to include the flask (and its dependency) in my application. The easiest way to do this with Google App Engine is to put them at the root level:

  MyProject app.yaml main.py MyApp Flask ...   

What is the correct way to bring these external modules in these projects? Both would be a generalized answer and a specific useful to my case. Apart from this, any other related recommendations will be appreciated very much thanks.

Although it is possible to include third party libraries in the form of subdomains or symuxes from external repositories, in practice It is not a good idea what can be wrong, there are two scenarios on this:

  1. If the third party library issues a new version that breaks the functionality, then You must either meet all necessary changes, new requirements or just the last Version continue to work and breaking the external connection. Usually this happens when you are very close to the deadline.

  2. If the third party library issues a new version and any of your affiliates has been upgraded and made all necessary changes to support the new version, your favor The code will be broken down until you upgrade.

    The above examples are much more visible in greater projects with greater dependencies and as more people who join the project in the long run become a major problem! I can come up with more examples, but I think you can see this point.

    Your best option is to include your libraries in your repository, which also has the advantage of projecting and running on a new machine without the whole many dependencies, and all of them have your way Required to be included at the same or deep level with the app.yaml file. Such as the only main library code described in Drugnox

    Also, not the place to put the goods in its repository reason is not an issue today and these libraries are usually not updated so that your The size of the reserves is not getting bigger over time. > Since you mentioned the flask on Google App Engine, you can see my project, where you can see in practice what is organized.

No comments:

Post a Comment