In my app.yaml, the url is defined as:
- url: /api/.* script: main.app login: admin secure: always
I tried the following code to talk with api
import requests def main(): r = requests.get("https://test.appspots.com/api/get_data", auth=(' me@me.com ', 'password')) print r.status_code, r.text if __name__ == '__main__': main()
But the authentication failed and judging by the result, I am redirected to the login page.
How can I use python for authentication and URL access?
source share