Example #1
0
#logging.getLogger('requests').setLevel(logging.WARNING)
#logging.basicConfig(level=logging.DEBUG)
logging.captureWarnings(True)
#import urllib3
#urllib3.disable_warnings()



appid = "55590b16a7f6527a06ebe96d"
appsec = "e4b72c8cb25d32ba" 
username = ""
password = ""



client = WO('webobservatory.soton.ac.uk', appid, appsec, username ,password )

##login after the client creation
res = client.login()
if res:
    print "Error message:"+ res


##demo of the query using a string:
err, res1 = client.query('52e19220bef627683c79c3a6','SELECT * WHERE {  ?subject rdf:type ?class} LIMIT 10')
if not err:
    print "\n\n"
    print "RESULT 1:"
    print res1
else:
    print err
Example #2
0
from wo import WO
import logging
###uncomment for printing debug info
#logging.getLogger('requests').setLevel(logging.WARNING)
#logging.basicConfig(level=logging.DEBUG)
logging.captureWarnings(True)
#import urllib3
#urllib3.disable_warnings()

appid = "55d6b06b4d6b5d1d21449967"
appsec = "eac2b1a25ef936ce"
username = ""
password = ""

client = WO('ui.webobservatory.me', appid, appsec, username, password)

##login after the client creation
res = client.login()
if res:
    print "Error message:" + res

##demo of the query using a string:
err, res1 = client.query('55d587a24d6b5d1d21449966',
                         'select * from iot.traffic_data limit 50;')
if not err:
    print "\n\n"
    print "RESULT 1:"
    print res1
else:
    print err
Example #3
0
#logging.getLogger('requests').setLevel(logging.WARNING)
#logging.basicConfig(level=logging.DEBUG)
logging.captureWarnings(True)
#import urllib3
#urllib3.disable_warnings()



appid = "55d6b06b4d6b5d1d21449967"
appsec = "eac2b1a25ef936ce" 
username = ""
password = ""



client = WO('ui.webobservatory.me', appid, appsec, username ,password )

##login after the client creation
res = client.login()
if res:
    print "Error message:"+ res


##demo of the query using a string:
err, res1 = client.query('55d587a24d6b5d1d21449966','select * from iot.traffic_data limit 50;')
if not err:
    print "\n\n"
    print "RESULT 1:"
    print res1
else:
    print err