[QGIS-Developer] Interaction API?

G. Allegri giovanni.allegri at gmail.com
Fri Sep 10 05:30:35 PDT 2021


Of course you can use PyQGIS to run standalone scripts, not only for
plugins, and that's what I was assuming from Andrea's request.
We have been using this approach in several contexts, even headless (server
applications).

Another option could be run a "micro server" inside a pyqgis plugin and
serve an ad-hoc API from it :)

Giovanni

Il giorno ven 10 set 2021 alle ore 14:15 Richard Duivenvoorde <
rdmailings at duif.net> ha scritto:

> On 9/9/21 3:33 PM, G. Allegri wrote:
> > Hi Andrea,
> >
> > I guess you mean QGIS Desktop, right? AFAIK the only option is to use
> its Python API, which requires all the PyQGIS <
> https://docs.qgis.org/3.16/en/docs/pyqgis_developer_cookbook/index.html>
> and binary libs to be available inside the environment.
>
> Just curious: but would it be possible to 'attach' your script to a
> running/visible instance of QGIS?
>
> From:
> https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#python-applications
>
> So: I start QGIS, and then from some python console (NOT the internal
> one), I can try to load (and show!) a shapefile in current mapcanvas? Or
> pan/zoom? That would be cool for demonstrations...
>
> Regards,
>
> Richard Duivenvoorde
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210910/575b5c24/attachment.html>


More information about the QGIS-Developer mailing list