[Qgis-developer] QGIS Server Python Plugins API

Alessandro Pasotti apasotti at gmail.com
Fri Oct 24 00:41:59 PDT 2014


2014-10-24 9:23 GMT+02:00 G. Allegri <giohappy at gmail.com>:
> Hi Alessandro,
> the concept is clear but I probably I was reading the worng repo:
> serverplugins-iface, which is the latest you authored.

Yes that's an old branch, I have to do some housekeeping :)

The latest branch for server plugins is
https://github.com/elpaso/QGIS/tree/serverpython

In my plans, I first have to get the requesthandler refactoring PR
accepted (it's in the queue), then I will PR the plugins support.

>
> However, what you're saying is that a plugin can completely change the
> incoming request and the outgoin request (I understand the middleware
> concept very well being a Django dev) and so:
>
>  - have the opportunity to server a non-standard service
>  - have the opportunity to do not let the request reach the QGIS Servers'
> request handlers.

Yes, basically, you can alter the incoming SERVICE value and skip core
C++ services completely, or you can alter the response of a core
service within the responseReady filter (see the watermark example
filter).

Possibilities are endless: give me a regexp and I will change the world :)

>
> I will have a look to the filter examples later.
> Thanks for this work Alessandro ;)
> giovanni
>

You're welcome! Let me know your impressions and suggestions.

In my TODO list I have a better exception handling (more pythonic) for
exceptions raised from the plugins and, within the python plugins, a
mechanism to cache and reload plugins configurations when it is
changed from the desktop, but this is far beyond the scope of QGIS
server plugins and much more into the python side of the topic and
currently crashes QGIS whenever I use QFileSystemWatcher (PyQT bug?).


-- 
Alessandro Pasotti
w3:   www.itopen.it


More information about the Qgis-developer mailing list