PyWPS is configured using a configuration file. The file uses the ConfigParser format.
New in version 4.0.0.
Compatibility with PyWPS 3.x: major changes have been made to the config file in order to allow for shared configurations with PyCSW and other projects.
The configuration file has 3 sections:
- metadata:main for the server metadata inputs
- server for server configuration
- loggging for logging configuration
- grass for optional configuration to support GRASS GIS
PyWPS ships with a sample configuration file (
A similar file is also available in the demo service as
described in The demo service and its sample processes section.
Copy the file to
default.cfg and edit the following:
The [metadata:main] section was designed according to the PyCSW project configuration file.
|the title of the service|
|some descriptive text about the service|
|comma delimited list of keywords about the service|
|keyword type as per the ISO 19115 MD_KeywordTypeCode codelist).
Accepted values are
|fees associated with the service|
|access constraints associated with the service|
|provider_name:||the name of the service provider|
|provider_url:||the URL of the service provider|
|contact_name:||the name of the provider contact|
|the position title of the provider contact|
|the address of the provider contact|
|contact_city:||the city of the provider contact|
|the province or territory of the provider contact|
|the postal code of the provider contact|
|the country of the provider contact|
|contact_phone:||the phone number of the provider contact|
|contact_fax:||the facsimile number of the provider contact|
|contact_email:||the email address of the provider contact|
|contact_url:||the URL to more information about the provider contact|
|contact_hours:||the hours of service to contact the provider|
|the how to contact the provider contact|
|contact_role:||the role of the provider contact as per the ISO 19115 CI_RoleCode codelist).
Accepted values are
|url:||the URL of the WPS service endpoint|
|language:||the ISO 639-1 language and ISO 3166-1 alpha2 country code of the service
|encoding:||the content type encoding (e.g.
|maximum number of parallel running processes - set this number carefully. The effective number of parallel running processes is limited by the number of cores in the processor of the hosting machine. As well, speed and response time of hard drives impact ultimate processing performance. A reasonable number of parallel running processes is not higher than the number of processor cores.|
|maxrequestsize:||maximal request size. 0 for no limit|
|workdir:||a directory to store all temporary files (which should be always deleted, once the process is finished).|
|outputpath:||server path where to store output files.|
outputpath and outputurl must corespond. outputpath is the name of the resulting target directory, where all output data files are stored (with unique names). outputurl is the corresponding full URL, which is targeting to outputpath directory.
Example: outputpath=/var/www/wps/outputs shall correspond with outputurl=http://foo.bar/wps/outputs
|level:||the logging level (see http://docs.python.org/library/logging.html#logging-levels)|
|file:||the full file path to the log file for being able to see possible error messages.|
|database:||Connection string to database where the login about requests/responses is to be stored. We are using SQLAlchemy please use the configuration string. The default is SQLite3 :memory: object.|
|gisbase:||directory of the GRASS GIS instalation, refered as GISBASE|
[server] encoding=utf-8 language=en-US url=http://localhost/wps maxoperations=30 maxinputparamlength=1024 maxsingleinputsize= maxrequestsize=3mb temp_path=/tmp/pywps/ processes_path= outputurl=/data/ outputpath=/tmp/outputs/ logfile= loglevel=INFO logdatabase= workdir= [metadata:main] identification_title=PyWPS Processing Service identification_abstract=PyWPS is an implementation of the Web Processing Service standard from the Open Geospatial Consortium. PyWPS is written in Python. identification_keywords=PyWPS,WPS,OGC,processing identification_keywords_type=theme identification_fees=NONE identification_accessconstraints=NONE provider_name=Organization Name provider_url=http://pywps.org/ contact_name=Lastname, Firstname contact_position=Position Title contact_address=Mailing Address contact_city=City contact_stateorprovince=Administrative Area contact_postalcode=Zip or Postal Code contact_country=Country contact_phone=+xx-xxx-xxx-xxxx contact_fax=+xx-xxx-xxx-xxxx contact_email=Email Address contact_url=Contact URL contact_hours=Hours of Service contact_instructions=During hours of service. Off on weekends. contact_role=pointOfContact [grass] gisbase=/usr/local/grass-7.3.svn/