Skip to main content

GNIP for Python.

Project description

===============
GNIP for Python
===============

GNIP for Python provides an easy way to access the PowerTrack stream provided by GNIP.

#!/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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gnippy-0.1.0.tar.gz (1.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page