In [1]:
from owslib.wps import WebProcessingService

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

In [3]:
wps = WebProcessingService(url, skip_caps=True)

Get Capabilities


In [7]:
wps.getcapabilities()

In [8]:
for p in wps.processes:
    print(p.identifier)


say_hello
sleep
say_hello
simple_plot

Describe Process


In [9]:
process = wps.describeprocess(identifier='simple_plot')

In [10]:
print(process.title)


Simple Plot

In [11]:
for inpt in process.dataInputs:
    print(inpt.identifier, inpt.dataType)


dataset ComplexData
variable string

In [12]:
for output in process.processOutputs:
    print(output.identifier, output.dataType)


output ComplexData

Execute Process


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)


http://localhost:5000/outputs/3ba1bc38-ad15-11e7-8f20-acde48001122.xml

In [20]:
execution.checkStatus()

In [21]:
execution.isComplete()


Out[21]:
True

In [22]:
execution.isSucceded()


Out[22]:
True

In [ ]:


In [ ]: