News API Wrapper

This documentation explains the methods of the News object. For the specific fields on the objects returned by these methods, see the official documentation.

class penn.news.News(bearer, token)[source]

The client for the News Search API.

Parameters:
  • bearer – The user code for the API
  • token – The password code for the API

Usage:

>>> from penn import News
>>> n = News('MY_USERNAME_TOKEN', 'MY_PASSWORD_TOKEN')
search(keyword)[source]

Return all news related to the provided query.

Parameters:keyword – The keyword for your news search
>>> results = n.search('interview')