Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple python library for the twitter streaming api
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
twitter
.gitignore
README.md
example.py
setup.py

README.md

A simple library for the twitter streaming api

Its as simple as:

from twitter.stream import BaseStreamingHandler

class SimpleClass(BaseStreamingHandler):
    def process_tweet(self,tweet):
       print tweet['text']

streamer = SimpleClass('username', 'password')
streamer.track(['key', 'words'])
streamer.sample()

you can also implement your own conversion of each tweet into a model of your choosing by overriding json_to_object in your subclass.

Something went wrong with that request. Please try again.