Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strike>To ask the obvious question: Why would you want to? (C)Python is supported natively by Google App Engine, and by now is fairly mature and very well supported.</strike></p> <p>To answer the original question, though: I don't have personal experience, but I can give you a general overview of what it'll be like:</p> <p>The easiest way currently will be to use Jython's support for calling into Java to use the App Engine Java SDK. This means that although you'll be writing Python, it's going to look a lot like Java, and you'll have to use the Java docs, rather than the Python one.</p> <p>It is, however, theoretically possible to use the Python SDK in Jython on App Engine. The SDK is pure Python, and all the interaction between the SDK and the runtime is done by way of RPCs though the google.appengine.api.apiproxy_stub_map module. Java has an equivalent interface in the com.google.apphosting.api.ApiProxy class - see the article on <a href="http://code.google.com/appengine/docs/java/howto/unittesting.html" rel="nofollow noreferrer">Unit Testing in GAE</a> for some details on how to configure it.</p> <p>Given all that, here's how you could use the Python API in Jython:</p> <ol> <li>Write a Python apiproxy_stub that simply takes all API calls and sends them to the com.google.apphosting.api.ApiProxy class.</li> <li>Bundle the relevant parts of the Python SDK with your Jython app (that's most of it, unfortunately).</li> <li>In your initialization code, install the apiproxy_stub subclass you wrote as the handler for all the relevant services - datastore_v3, memcache, user, urlfetch, and images.</li> </ol> <p>If you do end up doing this, please document it and release the code - I know of at least one other user who would be interested. :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload