Hi Dewey,

This page 
<https://cloud.google.com/appengine/docs/standard/python3/specifying-dependencies>
 explains 
how to manage dependencies using Python 3. In general, the process looks 
like this:

   - declare dependencies in a `requirements.txt` file (see "Declaring and 
   managing dependencies")
   - if you want to run/test your application locally, follow the steps to 
   set up a virtual environment (see "Installing dependencies locally")
   - when you deploy your app, only the dependencies listed in 
   `requirements.txt` are installed. For all practical purposes, the contents 
   of your env/ directory are ignored.

Note that use of `requirements.txt` and, if desired, `virtualenv` conforms 
to standard Python tooling. You shouldn't need to learn anything specific 
for App Engine. This is the current recommended approach. It is the same 
recommendation for the App Engine flexible environment and for Google 
Compute Engine.

Also note that the story is a bit different if you are using the Python 2.7 
runtime on App Engine. This is a legacy runtime and does not conform to 
modern standards in Python development. My advice would be to use the 
Python 3.7 runtime on App Engine, not the Python 2.7 runtime.

Stewart

On Tuesday, September 25, 2018 at 11:27:29 AM UTC-7, Dewey Gaedcke wrote:
>
> The amount of conflicting info about Python/GAE best practices is very 
> frustrating.
>
> Can someone please clarify:
> Should we use the vendored approach:
> from google.appengine.ext import vendor
> vendor.add('lib')
>
> Or should we use VENV?
>
> And is there a hybrid approach using both to accommodate most Python IDEs?
>
> If we use VENV (because our IDE requires it), how do we reconcile the two?
> In other words, VENV is going to install modules inside of the "env/" 
> directory where-as most tutorials instruct us to use:
> pip install --upgrade --requirement requirements.txt --target lib/
>
> Does the above advise change based on Python2.7 vs 3.7
> Does it change when moving to Flex or Compute?
>
> Google PLEASE!!! Remove all this contradictory info and clarify the 
> CURRENT recommended approach.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9939b912-6bfe-4b26-8565-842ce5ae61a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to