How to force Google App Engine [python] to use SSL (https)?

Just add a secure parameter to the app.yaml file.

handlers:
- url: /youraccount/.*
  script: accounts.py
  login: required
  secure: always

See Configuring Secure URLs in app.yaml

Google App Engine supports secure connections via HTTPS for URLs using the *.appspot.com domain. When a request accesses a URL using HTTPS, and that URL is configured to use HTTPS in the app.yaml file, both the request data and the response data are encrypted by the sender before they are transmitted, and decrypted by the recipient after they are received. Secure connections are useful for protecting customer data, such as contact information, passwords, and private messages.