Child pages
  • Calling NERC Vocab with SOAP
Skip to end of metadata
Go to start of metadata

Call the NERC Vocab with Python

In this example the NERC Vocabulary Server documentation is followed, with some adaptations (check code block below).

from suds.client import Client

url = ''
client = Client(url)
uris = ''
result = client.service.SearchVocab('*alinity*',False,'definition',10,True,uris,'all')

# call the function print_results, see below

The following code gives a listing of a few of the characteristics

def print_results(result):
    if result[1] != 0:
        for i in range(len(result[3][0])):
            print 'concept    =',result[3][0][i][1] 
            print 'label      =',result[3][0][i][2][0][0]
            print 'definition =',result[3][0][i][4][0][0]
            print 'member of  =',result[3][0][i][8][0][0]
            print 'identifier =',result[3][0][i][9]
            print '------------------------------------------'
            print ' '
        print 'no results found'