tweepyについて調べるんだ
pythonからtwitter apiを叩くには python-twitter を使っている事が多いようですが、どうやらoauthには未対応っぽいのです。
8月16日から8月31日の間、毎日APIを呼ぶ回数制限(rate limit)を毎日減らします。(1時間あたり10コールの単位で減らします。) 8月31日からはベーシック認証のAPIコールに対しては全てHTTP 403エラーを返します。
既にカウントダウンが始まっている状況なので、できればoauth認証可能なものを使いたいのが人情というものかなーっと。そこで少し調べてみたら oauth-python-twitter というものが見つかりました。これを使えばpython-twitterでoauthに対応できるようです。
でも調査中に tweepy という別のライブラリを見つけたので、python-twitter&oauth-python-twitterは一旦スルーしてこっちを先に調べようと思います。以下はtweepyのREADMEです。
A Twitter library for Python! Also works with identi.ca/laconi.ca !Features:
+ OAuth support (including xAuth)
+ Covers the entire Twitter API
+ Actively under development
+ Streaming API support
+ Cache system (memory, file)Documentation: http://joshthecoder.github.com/tweepy/docs/index.html
Mailing list: http://groups.google.com/group/tweepy
Chat: IRC freenode.net #tweepy
Web interface: http://webchat.freenode.net/?channels=tweepy
Wiki: http://wiki.github.com/joshthecoder/tweepy
Bug tracker: http://github.com/joshthecoder/tweepy/issuesSouce code:
Library: http://github.com/joshthecoder/tweepy
Examples: http://github.com/joshthecoder/tweepy-examplesAuthor: Joshua Roesslein
License: MIT
Dependencies:
Python 2.4 or newer
Simplejson http://undefined.org/python/#simplejson
**Included in python 2.6+
Python-OAuth http://code.google.com/p/oauth
**Bundled with this library
特徴を訳してみると、
- + OAuth support (including xAuth)
- OAuthをサポートしてます(xAuthも含んでいるよ)
- + Covers the entire Twitter API
- Twitter APIを全部カバーしてるよ
- + Actively under development
- 活発に開発してるよ
- + Streaming API support
- Streaming APIをサポートしてまっせ
- + Cache system (memory, file)
- キャッシュシステム(メモリ、ファイル)もあるんだぜ
「活発に開発してるよ」ってところがなんだか嬉しいですね。
ライセンスは MIT ですね。いいですねー。
依存しているものはPython2.4以上、Simplejson(2.6以上だと最初っから入っているよ)、Python-OAuth(tweepyにバンドルしてるんだ)の3つだけ。いいですねー。
というわけで、次から調べたこと/分かったことなんかを書いていきたいと思います。