See it running at http://braintree-python.appspot.com/
The main points here are:
- Have billing enabled for the google app engine account.
- See the
tryblock in main.py for how to get SSL working in development mode. - Add
sslto your app.yaml. - Use a working version of requests, or set the
GAE_USE_SOCKETS_HTTPLIBenvironmental variable in your app.yaml.
requests versions 2.6.1, 2.6.2, and 2.7.0 use versions of urllib3 that don't work correctly with the App Engine urlfetch API. Either use an earlier version of requests or use this commit from my branch of requests to fix it. See this github issue for more information.
Starting with requests 2.10.0, it should be possible to use requests-toolbelt's AppEngineAdapter instead of the fix listed above. See the requests-toolbelt docs for more information.