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 <
[email protected]> 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
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to