Skip to content

Instantly share code, notes, and snippets.

@sdstrowes
Created October 16, 2018 11:54
Show Gist options
  • Save sdstrowes/7e9143314e47a90ba06f18df644a8cfc to your computer and use it in GitHub Desktop.
Save sdstrowes/7e9143314e47a90ba06f18df644a8cfc to your computer and use it in GitHub Desktop.
from ripe.atlas.cousteau import AtlasStream
import json
def on_result_response(*args):
print json.dumps(args[0], indent=2)
atlas_stream = AtlasStream()
atlas_stream.connect()
channel = "atlas_result"
atlas_stream.bind_channel(channel, on_result_response)
stream_parameters = {"prb": 14277}
atlas_stream.start_stream(stream_type="result", **stream_parameters)
atlas_stream.timeout()
atlas_stream.disconnect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment