PyWPS is an implementation of the Web Processing Service standard from the Open Geospatial Consortium. PyWPS is written in Python.
As of PyWPS 4.0.0, PyWPS is released under an MIT license (see LICENSE.txt).
See requirements.txt file
Install it from GitHub:
$ git clone https://github.com/geopython/pywps.git
$ cd pywps/
$ pip install .pip install -r requirements-dev.txt
# run unit tests
python -m pytest tests
# run code coverage
python -m coverage run --source=pywps -m unittest tests
python -m coverage report -mCheckout source from GitHub:
$ git clone https://github.com/geopython/pywps.git
$ cd pywps/Build conda environment:
conda env create -f environment.ymlInstall pywps:
make installOr the development version:
make developRun tests:
make testsClone the example service after having installed PyWPS:
git clone git://github.com/geopython/pywps-flask.git pywps-flask
cd pywps-flask
python demo.pyAccess example service: http://localhost:5000
-
Enable WSGI extension
-
Add configuration:
WSGIDaemonProcess pywps user=user group=group processes=2 threads=5 WSGIScriptAlias /pywps /path/to/www/htdocs/wps/pywps.wsgi <Directory /path/to/www/htdocs/wps/> WSGIProcessGroup group WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory>
-
Create wsgi file:
#!/usr/bin/env python3 import sys sys.path.append('/path/to/src/pywps/') import pywps from pywps.app import Service, WPS, Process def pr1(): """This is the execute method of the process """ pass application = Service(processes=[Process(pr1)])
-
Run via web browser
http://localhost/pywps/?service=WPS&request=GetCapabilities&version=1.0.0 -
Run in command line:
curl 'http://localhost/pywps/?service=WPS&request=GetCapabilities&version=1.0.0'
On Windows PyWPS does not support multiprocessing which is used when making requests storing the response document and updating the status to displaying to the user the progression of a process.