Search code examples
pythongoogle-app-enginepsycopg2ponyorm

problems with psycopg2 on google apps engine


I get a problem when i tried to implement framework - Pony ORM in my google app engine application. The point is that the Pony uses psycopg2 (PostgreSQL adapter), and when im trying to make a request to database it raises an exeption - that it cannot find the psycopg2 modul. (in local python enviroment - evrthg works correct) Well, ive tried to manually add the psycopg package folder to the root of my project, but recieve the next error:

File "C:\Users\AcerFull\PycharmProjects\cloudepicerp\psycopg2__init__.py", line 50, in from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 898, in load_module raise ImportError('No module named %s' % fullname) ImportError: No module named psycopg2._psycopg

_psycopg file have extension - ".pyd" that means that it is not clear Python. As i understood, GAE works only with pure python Im beginner in Python and Google AppEngine and actually i dont know how to fix this problem...


Solution

  • Update: It seems that Google App Engine now supports PostgreSQL: https://cloud.google.com/sql/docs/postgres/connect-app-engine


    Google AppEngine does not support PostgreSQL. You cannot manage it to work.

    The native GAE datastore is not relational. Currently Pony ORM supports only relational databases, but in the future we can add support of NoSQL databases as well.

    GAE allows you to use MySQL in form of Google Cloud SQL. We can add support of Google Cloud SQL in Pony ORM, but not right now, because currently we have more urgent tasks such as migration support. You can open new issue if support of Google Cloud SQL is important to you.