dezzie / personality-insights-twitter-python

A simple python example that calls the twitter API to fetch a user's timeline and then calls Watson Personality Insights to estimate their personality traits.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IBM Watson Personality Insights Twitter Python Sample

This sample shows how to get Twitter data using the Twitter REST API (via the python-twitter client library) and submit it to the Personality Insights Service.

For non-twitter samples and more details on how to setup your Personality Insights service in bluemix see the official Watson Developer Cloud samples.

Setup

This sample was developed on Python 2.6.6 with the python-twitter and requests libraries, installed via pip.

Configuring your Twitter and Personality Insights Credentials

To configure the sample, copy config.py.example to config.py and edit config.py to fill in your Twitter and Personality Insights Credentials. Instructions are provided in the config.py.example file.

Running the sample

Provide a twitter handle/screen name WITHOUT the leading @ sign. Example:

python twitteranalyzer.py jschoudt

About

A simple python example that calls the twitter API to fetch a user's timeline and then calls Watson Personality Insights to estimate their personality traits.


Languages

Language:Python 100.0%