Permalink
Browse files

Createing README.rst

  • Loading branch information...
1 parent 1adc0e1 commit fbfa24dbe22fbcfb8c788b69acefa0f9f9644bd4 @abh1nav committed Dec 6, 2012
Showing with 37 additions and 0 deletions.
  1. +37 −0 README.rst
View
@@ -0,0 +1,37 @@
+gnippy: GNIP + Python
+=====================
+
+gnippy provides an easy way to access the `Power Track <http://gnip.com/twitter/power-track/>`_ stream provided by GNIP.
+
+Installation:
+
+.. code-block:: pycon
+
+ pip install gnippy
+
+Usage:
+
+.. code-block:: pycon
+
+ #!/usr/bin/env python
+
+ import time
+ from gnippy import PowerTrackClient
+
+ # Define a callback
+ def callback(activity):
+ print activity
+
+ # Create the client
+ url = "http://my.gnip.powertrack/url.json"
+ auth = ('MyUserName', 'MyPassword')
+ client = PowerTrackClient(url, auth, callback)
+ client.connect()
+
+ # Wait for 2 minutes and then disconnect
+ time.sleep(120)
+ client.disconnect()
+
+That's it!
+
+Source available on GitHub: http://github.com/abh1nav/gnippy/

0 comments on commit fbfa24d

Please sign in to comment.