PyWPS Process

Processes directory

A PyWPS process can be thought of as a Python module. All PyWPS processes are stored in one directory Python Package. The __init__.py file must contain the list of processes in __all__ array.

Default location for processes

The default location of PyWPS processes is located in the pywps/processes directory, in the installation location of PyWPS.

Configuration via PYWPS_PROCESSES environment variable

Usually, you will overwrite this with the PYWPS_PROCESSES environment variable in the Configuration.

Configuration via configuration file

Alternatively you can set the processesPath variable in the configuration file.

Logging

PyWPS uses Python module logging for logging purposes. If there is something you need to log (activity, variable content for debug or anything else), just import the module and use accordingly:

import logging
LOGGER = logging.getLogger(__name__)
...

LOGGER.info("Just information message")
LOGGER.debug("Variable content: %s" % variable)
LOGGER.error("Error occured: %s" % e)

The logs are printed to standard error, or to a file set in the configuration file Configuration. Log level is set with logLevel option, also in the configuration file.