def get_buzz(self): app = create_app() url = ('https://www.googleapis.com/' 'plus/v1/people/%s/activities/public?key=%s' % ( app.config['GPLUS_ID'], app.config['API_KEY'])) data = urllib2.urlopen(url) json_data = json.loads(data.read()) buzz =[] for item in json_data.get('items'): buzz.append(Post.get_from_json(item)) return buzz
from gplusblog import create_app, create_manager app = create_app() manager = create_manager(app) def run_manager(): manager.run()