Welcome to Readability API Python Library’s documentation!

Release v0.2.5.

Installation

The Readability package is hosted on Github and can easily be installed using pip.

$ pip install readability-api

Reader API Client

The Reader API client requires four pieces of credential data. A consumer key and consumer secret can be obtained from the Readability account page. In addition to consumer creds, a user’s key and secret must also be used for authentication.

Getting a user’s favorite bookmarks is easy.

from readability import ReaderClient
rdb_client = ReaderClient('consumer_token', 'consumer_secret', 'user_key', 'user_secret')
bookmarks_response = rdb_client.get_bookmarks(favorite=True)
print bookmarks_response.content

>>> {'bookmarks': [{'user_id': 9999, 'read_percent': u'0.00', ... }

See readability.ReaderClient docs for a complete list of available functionality.

Parser API Client

Authentication with the Parser API is simpler than the Reader API. All that’s needed is a single token that can be obtained from the Readability account page. With a token, getting the parsed output for an article is easy.

from readability import ParserClient
parser_client = ParserClient('your_parser_token')
parser_response = parser_client.get_article_content('http://www.some-web-page/blog.html')
print parser_response.content['content']
>>> {"content" <div class=\"article-text\">\n<p>I'm idling outside Diamante's, [snip] ...</p></div>", ... }

See readability.ParserClient docs for a complete list of available functionality.