Documentation for pulsar 0.9.2. For development docs, go here.

Twitter Streaming

The code for this example is located in the examples.tweets.manage module.

This example uses the streaming capabilities of the HttpClient to hook into twitter streaming api and send tweets into a processing queue.

Implementation

class examples.tweets.manage.Twitter(callable=None, load_config=True, **params)[source]

This applications requires the following parameters to be specified in your config.py file:

  • twitter_api_key the Consumer key of your application
  • twitter_api_secret, the Consumer secret
  • twitter_access_token, the application Access token
  • twitter_access_secret, the Access token secret
  • twitter_stream_filter, dictionary of parameters for filtering tweets.

Check the twitter stream filter api for further information

https://dev.twitter.com/docs/api/1.1/post/statuses/filter

reconnect(response, exc=None)[source]

Handle reconnection according to twitter streaming policy

https://dev.twitter.com/docs/streaming-apis/connecting



Table Of Contents

Previous topic

Django with Pulsar

Next topic

Dining Philosophers

This Page