Google App Engineの認証は、Googleアカウントを使うのが最も簡単だが、今回、Twitterと連携するWebアプリケーションを作ったので、認証をTwitterで済ましてしまおうと思いやってみた。 使用したライブラリは、tweepy joshthecoder/tweepy · GitHub と、simple_cookie.py 参考にさせていただいたサイトは、 tweepyでtwitterの3-legged OAuth認証を試してみた(GoogleAppEngine) | taichino.com 。 他にもいくつか見たが、ここが一番参考になった。 pythonで認証といえば、デコレータ。 という、Djangoを使ってて感動した部分を踏襲させていただき、webappのgetやpostメソッドにdecorateすれば認証した結果を、requestに追加するようにした。 先に使