]> jfr.im git - z_archive/twitter.git/blame_incremental - twitter/__init__.py
Add better formatting to status output.
[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 .stream import TwitterStream
16from .oauth_dance import oauth_dance
17
18# Who needs Sphinx? Not me!
19
20__doc__ += """
21The Twitter class
22-----------------
23"""
24__doc__ += dedent(Twitter.__doc__)
25
26__doc__ += """
27The TwitterStream class
28-----------------------
29"""
30__doc__ += dedent(TwitterStream.__doc__)
31
32
33__doc__ += """
34Twitter Response Objects
35------------------------
36"""
37__doc__ += dedent(TwitterResponse.__doc__)
38
39
40__doc__ += """
41Authentication
42--------------
43
44You can authenticate with Twitter in three ways: NoAuth, OAuth, or
45UserPassAuth. Get help() on these classes to learn how to use them.
46
47OAuth is probably the most useful.
48
49
50Working with OAuth
51------------------
52"""
53
54__doc__ += dedent(oauth_doc)
55
56__all__ = ["Twitter", "TwitterStream", "TwitterResponse", "TwitterError",
57 "TwitterHTTPError", "NoAuth", "OAuth", "UserPassAuth",
58 "read_token_file", "write_token_file", "oauth_dance"]