[Qgis-developer] QEP: QGIS Mapserver Python Plugins

René-Luc Dhont rldhont at gmail.com
Fri Aug 29 07:39:26 PDT 2014


Hi Alessandro

Thanks for this interesting input.
I'm happy to test it and to develope some use case.
I thought it's a good feature and can help to enhance QGIS-Server easily 
: WPS, WMTS, Table Join Service, WFS2 or other that OGC does not already 
know.

Regards,
René-Luc


Le 28/08/2014 14:49, Alessandro Pasotti a écrit :
> Hello,
>
> as anticipated to some of you during the last HF, I've started to add
> Python plugins support for the server side.
>
> The rationale behind server plugins is doublefold: first they could
> provide additional services without the need to touch the C++
> codebase, second they allow for GUI-based configuration since the
> server plugins are not separated from the desktop plugins (of course
> the environment and permissions should be carefully configured to
> allow information sharing from the desktop user to the webserver user
> ).
>
> I've already coded a first working implementation and a few
> proof-of-concept plugins.
>
> The current implementation is based on the following ideas:
>
> QGIS Python plugins can have additional metatags to specify what
> SERVICE and REQUEST they expose, for example:
>
> service=HELLO
> methods=GetCapabilities,GetOutput,RemoteConsole
>
> This plugin will respond to calls like
> /cgi-bin/qgis_mapserv.fcgi?SERVICE=HELLO&REQUEST=RemoteConsole
>
>
> The current implementation is pretty simple and CGI-style, whatever
> the plugin prints to sdtout is captured and sent back to the client,
> the return value from the method is the (optional) content type.
>
> I would like to discuss this ideas during the next HF (or sooner), in
> particular:
>
> * I'm not happy with the current request handling and I think we need
> a mehod to pass cached parsed project instances to the plugins when
> needed and a better handling of HTTP headers
> * I 'd like to see signals/slots implementation instead of static
> function calls, but maybe it's just syntactic sugar
> * from the python side, we don't have an iface to pass to the plugins,
> so I'm currently stuck to @staticmethod
>
>
> The code is in a branch:
> https://github.com/elpaso/QGIS/tree/serverplugins
>
> HelloServer demo plugin:
> https://github.com/elpaso/qgis-helloserver
> It is a test plugin and it provides a remote console (web shell),
> insanely insecure DO NOT USE IN PRODUCTION!! and arbitrary python code
> execution configurable through the QGIS desktop plugin GUI.
>
> Here is a short demo of the HelloServer plugin:
> http://youtu.be/ys9VVxQ8uac
>
> Have fun !!
>
>



More information about the Qgis-developer mailing list