Skip to main content

OWS utilities

Project description


Build Status PyPI version Documentation Status

pyows is a library to help building an OWS compatible service or client. It helps building requests and parsing them and also provides object types to be serialized and sent as responses.


Use the package manager pip to install pyows.

pip install pyows


pyows can be used to both parse/encode OWS requests and to parse/encode objects for the various services.

Example: Parsing a WCS 2.0 GetCoverage request:

>>> from ows.wcs.v20.decoders import xml_decode_get_coverage
>>> request = b"""<?xml version="1.0" encoding="UTF-8"?>
... <wcs:GetCoverage
...     xmlns:xsi=''
...     xsi:schemaLocation=""
...     xmlns=""
...     xmlns:wcs=""
...     service="WCS"
...     version="2.0.1">
...     <wcs:CoverageId>a</wcs:CoverageId>
... </wcs:GetCoverage>
... """
>>> print(xml_decode_get_coverage(request))
GetCoverageRequest(coverage_id='a', format=None, mediatype=None, subsetting_crs=None, output_crs=None, subsets=[], scalefactor=None, scales=[], interpolation=None, axis_interpolations=[], range_subset=None)

The other way around:

>>> from ows.wcs.v20 import GetCoverageRequest, Trim, Slice
>>> request = GetCoverageRequest(
...     coverage_id='a',
...     subsets=[
...         Trim(dimension='x', low=1.2, high=2.2),
...         Trim(dimension='y', low=3),
...         Slice(dimension='time', point='2018-05-07')
...     ]
... )
>>> print(xml_encode_get_coverage(request, pretty_print=True).value.decode('utf-8'))
<wcs:GetCoverage xmlns:crs="" xmlns:eop="" xmlns:gml="" xmlns:gmlcov="" xmlns:int="" xmlns:ogc="" xmlns:om="" xmlns:ows="" xmlns:rsub="" xmlns:scal="" xmlns:swe="" xmlns:wcs="" xmlns:wcseo="" xmlns:xlink="" service="WCS" version="2.0.1">

Currently supported OWS

  • OWS common
    • 2.0:
      • Capabilities related encoding
  • WCS
    • 2.0:
      • Request encoding/decoding for (both XML/KVP)
        • GetCapabilities
        • DescribeCoverage
        • GetCoverage
      • Response encoding
        • Capabilities
        • CoverageDescriptions
    • 2.1
      • Response encoding for
        • CoverageDescriptions


  • Full support of WCS 2.x including EO-WCS application profile and all extensions
  • Support for WPS 2.0 requests and responses
  • Support for WMS request and responses for all versions


Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyows, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size pyows-0.2.0.tar.gz (44.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page