magpie.owsrequest
¶
The OWSRequest is based on pywps code:
https://github.com/geopython/pywps/tree/pywps-3.2/pywps/Parser
https://github.com/geopython/pywps/blob/master/pywps/app/WPSRequest.py
Module Contents¶
Classes¶
Basically a case-insensitive query string parser. |
|
Functions¶
|
Retrieve the appropriate |
|
-
magpie.owsrequest.
ows_parser_factory
(request: pyramid.request.Request) → OWSParser[source]¶ Retrieve the appropriate
OWSParser
parser using theContent-Type
header.If the
Content-Type
header is missing ortext/plain
, and the request has a body, try to parse the body as JSON and set the content-type toapplication/json
if successful.Handle XML-like
Content-Type
headers such asapplication/x-www-form-urlencoded
whenever applicable.Otherwise, use the basic
OWSGetParser
orOWSPostParser
according to the presence of a body. These provide minimal parsing to handle most typical OGC Web Services (OWS) request parameters.
-
class
magpie.owsrequest.
OWSParser
(request)[source]¶ Bases:
object
-
parse
(self, param_list)[source]¶ Parses the initialized
request
to populateparams
retrieved from the parser.Once this method has been called, all expected parameters are guaranteed to exist within :attr`params`. Missing query parameters from the
request
will be set toNone
. All query parameter names will be normalized to lower characters for easier retrieval.- Parameters
param_list – all known query parameters to the service.
-
-
class
magpie.owsrequest.
OWSGetParser
(request)[source]¶ Bases:
magpie.owsrequest.OWSParser
Basically a case-insensitive query string parser.
-
class
magpie.owsrequest.
OWSPostParser
(request)[source]¶ Bases:
magpie.owsrequest.OWSParser
-
class
magpie.owsrequest.
MultiFormatParser
(request)[source]¶ Bases:
magpie.owsrequest.OWSParser