Im making a webpage through google app engine that querys based on the person needs from an existing SQL database located on a local server. Im having trouble importing third party python libraries because most of them are not written in native python code (google app engine only supports fully python code). I have searched everywere for a way to connect to this database but I cant find a way around this issue.
2 Answers
You can use the MySQLdb library, which is a built-in library for App Engine. See the set up instructions in the docs for details.
Specify the MySQLdb library in the app.yaml libraries element:
libraries:
- name: MySQLdb
version: "latest"
Comments
What @BrettJ said, some of the common third-party libs for python are not pure python, and thus cannot be imported into the project unless google whitelists them end enables them to be imported in a safe manner, basically, what you need to do is to have MySQLdb library set in the app.yaml file.
libraries:
- name: MySQLdb
version: "latest"
I highly suggest you go through several tutorials, this is basic stuff and will be cleared to you in minimum time.