In [1]:
import requests

Get Service Capabilities


In [2]:
wps_url = 'http://localhost:5000/wps'

In [5]:
resp = requests.get(wps_url + '?service=WPS&request=GetCapabilities')
print(resp.url)
# print(resp.content)


http://localhost:5000/wps?service=WPS&request=GetCapabilities

Describe simple_plot Process


In [6]:
resp = requests.get(wps_url + '?service=WPS&request=DescribeProcess&version=1.0.0&identifier=simple_plot')
print(resp.url)
# print(resp.content)


http://localhost:5000/wps?service=WPS&request=DescribeProcess&version=1.0.0&identifier=simple_plot

Execute simple_plot Process


In [11]:
nc_url = "https://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.derived/surface/air.mon.ltm.nc"
req_url = wps_url + '?service=WPS&request=Execute&version=1.0.0&'
req_url += 'identifier=simple_plot&'
req_url += 'datainputs=dataset=@xlink:href={};variable=air'.format(nc_url)
resp = requests.get(req_url)
print(resp.url)


http://localhost:5000/wps?service=WPS&request=Execute&version=1.0.0&identifier=simple_plot&datainputs=dataset=@xlink:href=https://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.derived/surface/air.mon.ltm.nc;variable=air

Execute simple_plot Process asynchronously


In [12]:
nc_url = "https://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.derived/surface/air.mon.ltm.nc"
req_url = wps_url + '?service=WPS&request=Execute&version=1.0.0&'
req_url += 'identifier=simple_plot&'
req_url += 'datainputs=dataset=@xlink:href={};variable=air&'.format(nc_url)
req_url += 'storeExecuteResponse=true&'
req_url += 'status=true'
resp = requests.get(req_url)
print(resp.url)


http://localhost:5000/wps?service=WPS&request=Execute&version=1.0.0&identifier=simple_plot&datainputs=dataset=@xlink:href=https://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.derived/surface/air.mon.ltm.nc;variable=air&storeExecuteResponse=true&status=true

In [ ]: