]> jfr.im git - z_archive/twitter.git/blame_incremental - twitter/__init__.py
Restore Python 2.6 compatibility by restoring the old version of recv_chunk, only...
[z_archive/twitter.git] / twitter / __init__.py
... / ...
CommitLineData
1"""
2The minimalist yet fully featured Twitter API and Python toolset.
3
4The Twitter and TwitterStream classes are the key to building your own
5Twitter-enabled applications.
6
7"""
8
9from textwrap import dedent
10
11from .api import Twitter, TwitterError, TwitterHTTPError, TwitterResponse
12from .auth import NoAuth, UserPassAuth
13from .oauth import (OAuth, read_token_file, write_token_file,
14 __doc__ as oauth_doc)
15from .oauth2 import OAuth2
16from .stream import TwitterStream
17from .oauth_dance import oauth_dance
18
19__doc__ = __doc__ or ""
20
21__doc__ += """
22The Twitter class
23-----------------
24"""
25__doc__ += dedent(Twitter.__doc__ or "")
26
27__doc__ += """
28The TwitterStream class
29-----------------------
30"""
31__doc__ += dedent(TwitterStream.__doc__ or "")
32
33
34__doc__ += """
35Twitter Response Objects
36------------------------
37"""
38__doc__ += dedent(TwitterResponse.__doc__ or "")
39
40
41__doc__ += """
42Authentication
43--------------
44
45You can authenticate with Twitter in three ways: NoAuth, OAuth, or
46UserPassAuth. Get help() on these classes to learn how to use them.
47
48OAuth is probably the most useful.
49
50
51Working with OAuth
52------------------
53"""
54
55__doc__ += dedent(oauth_doc or "")
56
57__all__ = ["Twitter", "TwitterStream", "TwitterResponse", "TwitterError",
58 "TwitterHTTPError", "NoAuth", "OAuth", "UserPassAuth",
59 "read_token_file", "write_token_file", "oauth_dance", "OAuth2"]