In [1]:
from owslib.wps import WebProcessingService
In [2]:
url = 'http://localhost:5000/wps'
In [3]:
wps = WebProcessingService(url, skip_caps=True)
In [7]:
wps.getcapabilities()
In [8]:
for p in wps.processes:
print(p.identifier)
In [9]:
process = wps.describeprocess(identifier='simple_plot')
In [10]:
print(process.title)
In [11]:
for inpt in process.dataInputs:
print(inpt.identifier, inpt.dataType)
In [12]:
for output in process.processOutputs:
print(output.identifier, output.dataType)
In [13]:
from owslib.wps import monitorExecution, ComplexDataInput
In [15]:
nc_url = "https://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.derived/surface/air.mon.ltm.nc"
dataset = ComplexDataInput(nc_url, mimeType='appliction/x-netcdf')
inputs = [
('dataset', dataset),
('variable', 'air')
]
execution = wps.execute(identifier='simple_plot', inputs=inputs, output=[('output', True)])
In [16]:
print(execution.statusLocation)
In [20]:
execution.checkStatus()
In [21]:
execution.isComplete()
Out[21]:
In [22]:
execution.isSucceded()
Out[22]:
In [ ]:
In [ ]: