[Pywps-dev] using collectons.deque for reuquest.inputs

Jachym Cepicky jachym.cepicky at gmail.com
Thu Jul 23 00:18:10 PDT 2015


Hi

as we are all aware, Inputs can indicate, that there be *more of them with
same indentificator* (maxOccurs parametr)

In PyWPS 3, support for multiple inputs was only simple, for PyWPS-4, there
was non - until
https://github.com/jachym/pywps-4/commit/52dc170242fbad625fdf1339850228c7d4e449c5
(now)

I've introduced collection.deque objects (which acts like and list) [1]

One side effect: in the process, you have to count with the fact,
wpsrequest.inputs[identifier] can have more then one inputs -> to access
the first one, you need to call (e.g.)

wpsrequest.inputs[identifier][0].file

PyWPS can can now handle multiple separate data inputs with different
mimetypes etc..


I hope, everybody is fine with the change

J

[1] https://docs.python.org/3/library/collections.html#collections.deque
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20150723/2afdde77/attachment.html>


More information about the pywps-dev mailing list