is it possible to use PyMongo in Google App Engine?
I'm trying to use a MongoDB Database from a Google App Engine service is that possible? How do I install the PyMongo driv开发者_如何学编程er on Google App Engine? Thanks
No, it is not possible. Read the Runtime Environment section. On App Engine you'll have to use the datastore, or a 'database service' you can access using HTTP calls.
You might want to check out TyphoonAE.
It's not possible because you don't have access to networks sockets in App Engine. As long as you cannot access the database via HTTP, it's impossible.
The new runtime environment section says:
an app cannot write data to the local file system or make arbitrary network connections.
I am not sure to which level this is still being enforced (seeing that it's 7 years since the question was asked and answered), but we at Tam have successfully used the PyMongo driver in the standard Google App Engine Python runtime without issues. We simply followed the official PyMongo tutorial and it worked out.
精彩评论