Pergunta

I'm trying to use a MongoDB Database from a Google App Engine service is that possible? How do I install the PyMongo driver on Google App Engine? Thanks

Foi útil?

Solução

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.

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top