Skip to content

Instantly share code, notes, and snippets.

@linar-jether
Created September 10, 2015 15:15
Show Gist options
  • Save linar-jether/a843394afe39b51f3f46 to your computer and use it in GitHub Desktop.
Save linar-jether/a843394afe39b51f3f46 to your computer and use it in GitHub Desktop.
Use App Engine services using the remote_api, works locally and in ipython shell
import getpass
import sys
sys.path.insert(0,r"C:\Program Files (x86)\Google\google_appengine")
sys.path.insert(0,r"C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib")
sys.path.insert(0,r"C:\Program Files (x86)\Google\google_appengine\lib\fancy_urllib")
from google.appengine.ext.remote_api import remote_api_stub
from google.appengine.ext import db
app_id = 'your-app-id'
host = '%s.appspot.com' % app_id
remote_api_stub.ConfigureRemoteApiForOAuth(host,
'/_ah/remote_api', True)
@linar-jether
Copy link
Author

Yep, still works.
I tried the other ConfigureRemoteApi methods and couldn't get them to work... seems google has abandoned the remote api (Even after i managed to authenticate there are many other problems).
But maybe an outdated version? or the mac version missed an update?
The most recent version listed here (google_appengine_1.9.26.zip)
contains ConfigureRemoteApiForOAuth in remote_api_stub.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment