...
Code Block |
---|
from suds.client import Client
url = 'http://www.eu-nomen.eu/portal/soap.php?p=soap&wsdl=1'
client = Client(url)
"""Request for id of scoter familiy"""
result = client.service.getGUID('Melanitta nigra')
pesiid = result.split(':')[len(result.split(':'))-1]
print pesiid
>>> 137073
|
Give species list with id's for the genus scoter (Melanitta)
Code Block |
---|
from suds.client import Client
url = 'http://www.eu-nomen.eu/portal/soap.php?p=soap&wsdl=1'
client = Client(url)
"""give all possible memebers of the scoter genus"""
searchspecies = 'Melanitta'
result = client.service.getPESIRecords('%{species}%'.format(species=searchspecies))
if len(result) > 0:
print 'resultlist of species search for {species}'.format(species=searchspecies)
print 'rank name PESIid'
for s in result:
print s[4],s[2],s[1].split(':')[len(s[1].split(':'))-1]
>>>
resultlist of species search for Melanitta
rank name PESIid
Genus Melanitta 137002
Species Melanitta americana 366594
Species Melanitta deglandi 96540
Species Melanitta fusca 137072
Species Melanitta nigra 137073
Subspecies Melanitta nigra americana 366593
Species Melanitta perspicillata 159095
|
Why should you use this? In case of working with biological data there is always dispute about the naming of the observed species. PESI is the European name list which has a reference to all species descriptions. If you are looking for a description of species as a metadata within a project you could use this service to give correct descriptions. This is metadata on the level of records, not data sets.
PESI is the back bone of the INSPIRE metadata vocabularies concerning biological data.