Loading custom libraries with appengine_config.py

61 views
Skip to first unread message

frank....@mycommunity.net

unread,
Apr 1, 2015, 5:35:57 AM4/1/15
to google-a...@googlegroups.com

Hi,

I was trying out custom runtimes / managed vms support [1] with python yesterday with an existing app engine app.

I notice that it does not seem to load my custom libraries with appengine_config.py:

appengine_config.py:

from google.appengine.ext import vendor

vendor.add('lib')

This worked fine in regular app engine, but not in managed vms, it is as if the managed vm runtime is not loading this file.

I know managed runtimes are beta but can anyone confirm that this method of loading libraries is not supported in managed vms?
I'm trying to work out if I have done something wrong or whether my app needs to change. 


Thanks,

Frank

Jon Parrott

unread,
Apr 2, 2015, 12:26:57 PM4/2/15
to google-a...@googlegroups.com
Hi Frank,
The VM runtime doesn't automatically load appengine_config like the non-VM runtime. Here's two things you can do to use third-party packages:
  • Import appengine_config at the top of main.py
  • Take advantage of the Docker container and install everything via pip in your Dockerfile. See this sample dockerfile.
I highly recommend the docker approach. 
Reply all
Reply to author
Forward
0 new messages