Producing tweets

A Kinesis producer can take many shapes as long as it sends data to the Kinesis Stream. We will use the Python Firehose SDK and write a simple script that collects Tweets from the twitter API, filters some of them, and sends them to the Kinesis Firehose. We use the Python-Twitter library.

There are several Twitter API Python packages available on GitHub. Two of the more popular ones, Twitter and Python-Twitter (https://pypi.python.org/pypi/python-twitter/) share the same import calls import twitter, but not the same method calls, which can lead to confusion and time being wasted.

The Python-Twitter package offers a GetSearch method that takes either a query string term or a raw_query as a parameter for the Twitter search: ...

Get Effective Amazon Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.