Re: [QGIS-Developer] Automatically install and update plugins
Hi Alessandro, thanks again. That is a very good collection of useful topics. I am sure that will help us. Best regards, Josef Von: Alessandro Pasotti Gesendet: Mittwoch, 6. November 2019 13:38 An: Bauer.Josef extern IT-DS-TS Cc: QGIS Developer Mailing List Betreff: Re: [QGIS-Developer] Automatically install and update plugins On Wed, Nov 6, 2019 at 1:27 PM mailto:bauer.jo...@swm.de>> wrote: Hi Alessandro, thank you very much, that was exactly what we were looking for! Maybe it would be nice to put the QgsPluginInstaller also into the official API documentation (or in the “Deploying QGIS within an organization” documentation)? I could imagine that others also try to establish an “autoinstall/autoupdate” scenario. I'm not sure we can add that information to the API docs, because that code is not part of the stable API but it's something to consider for sure. Btw, I've just found buried in the internet a work I've done a few years ago when I was working for Boundless: https://boundless-desktop.readthedocs.io/en/latest/system_admins/init_scripts.html#scripts-examples It may be helpful for your use case (I think it's for QGIS 2.x but it should be easily portable to QGI 3). Best regards, Josef Von: Alessandro Pasotti mailto:apaso...@gmail.com>> Gesendet: Mittwoch, 6. November 2019 12:21 An: Bauer.Josef extern IT-DS-TS mailto:bauer.jo...@swm.de>> Cc: QGIS Developer Mailing List mailto:qgis-developer@lists.osgeo.org>> Betreff: Re: [QGIS-Developer] Automatically install and update plugins On Wed, Nov 6, 2019 at 12:10 PM mailto:bauer.jo...@swm.de>> wrote: Hi Allesandro, thank you for the answer. That sounds very promising. I think that is what we need. But can you tell me what exact Python API we have to use? I can’t find anything related to that topic in the API documentation [0] (we are using the LTR version QGIS 3.4). Yeah, there is not much QGIS core API for plugins management, it's mainly done in the Python side: https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/installer.py [0] https://qgis.org/pyqgis/3.4/index.html Tanks und kind regards, Josef Von: Alessandro Pasotti mailto:apaso...@gmail.com>> Gesendet: Mittwoch, 6. November 2019 11:50 An: Bauer.Josef extern IT-DS-TS mailto:bauer.jo...@swm.de>> Cc: QGIS Developer Mailing List mailto:qgis-developer@lists.osgeo.org>> Betreff: Re: [QGIS-Developer] Automatically install and update plugins On Wed, Nov 6, 2019 at 11:38 AM mailto:bauer.jo...@swm.de>> wrote: Dear QGIS Developer, we have written some plugins that we would like to be installed and updated automatically (without any user interaction). We have also setup an internal plugins server. We can install the plugins from our plugin server manually, but is there also the possibility to install and update them without any user interactions (we have pre-configured the plugins in the QGIS3.ini)? basically, you need to create a custom startup py file and deploy it (it can also live on a network share), the startup script will contain the instructions (using the QGIS python API) to upgrade the plugins you need automatically. See the links for some more information: https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#the-startup-py-file https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html#deploying-qgis-within-an-organization Hope this helps. -- Alessandro Pasotti w3: www.itopen.it<http://www.itopen.it> -- Alessandro Pasotti w3: www.itopen.it<http://www.itopen.it> -- Alessandro Pasotti w3: www.itopen.it<http://www.itopen.it> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Automatically install and update plugins
On Wed, Nov 6, 2019 at 1:27 PM wrote: > Hi Alessandro, > > > > thank you very much, that was exactly what we were looking for! > > > > Maybe it would be nice to put the QgsPluginInstaller also into the > official API documentation (or in the “Deploying QGIS within an > organization” documentation)? I could imagine that others also try to > establish an “autoinstall/autoupdate” scenario. > I'm not sure we can add that information to the API docs, because that code is not part of the stable API but it's something to consider for sure. Btw, I've just found buried in the internet a work I've done a few years ago when I was working for Boundless: https://boundless-desktop.readthedocs.io/en/latest/system_admins/init_scripts.html#scripts-examples It may be helpful for your use case (I think it's for QGIS 2.x but it should be easily portable to QGI 3). > > Best regards, > > Josef > > > > *Von:* Alessandro Pasotti > *Gesendet:* Mittwoch, 6. November 2019 12:21 > *An:* Bauer.Josef extern IT-DS-TS > *Cc:* QGIS Developer Mailing List > *Betreff:* Re: [QGIS-Developer] Automatically install and update plugins > > > > > > On Wed, Nov 6, 2019 at 12:10 PM wrote: > > Hi Allesandro, > > > > thank you for the answer. That sounds very promising. I think that is what > we need. > > > > But can you tell me what exact Python API we have to use? I can’t find > anything related to that topic in the API documentation [0] (we are using > the LTR version QGIS 3.4). > > > > > > Yeah, there is not much QGIS core API for plugins management, it's mainly > done in the Python side: > https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/installer.py > > > > > > > > [0] https://qgis.org/pyqgis/3.4/index.html > > > > Tanks und kind regards, > > Josef > > > > *Von:* Alessandro Pasotti > *Gesendet:* Mittwoch, 6. November 2019 11:50 > *An:* Bauer.Josef extern IT-DS-TS > *Cc:* QGIS Developer Mailing List > *Betreff:* Re: [QGIS-Developer] Automatically install and update plugins > > > > > > > > On Wed, Nov 6, 2019 at 11:38 AM wrote: > > Dear QGIS Developer, > > > > we have written some plugins that we would like to be installed and > updated automatically (without any user interaction). We have also setup an > internal plugins server. We can install the plugins from our plugin server > manually, but is there also the possibility to install and update them > without any user interactions (we have pre-configured the plugins in the > QGIS3.ini)? > > > > > > basically, you need to create a custom startup py file and deploy it (it > can also live on a network share), the startup script will contain the > instructions (using the QGIS python API) > > to upgrade the plugins you need automatically. > > > > See the links for some more information: > > > > > https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#the-startup-py-file > > > https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html#deploying-qgis-within-an-organization > > > > > > Hope this helps. > > > > -- > > Alessandro Pasotti > w3: www.itopen.it > > > > -- > > Alessandro Pasotti > w3: www.itopen.it > -- Alessandro Pasotti w3: www.itopen.it ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Automatically install and update plugins
Hi Alessandro, thank you very much, that was exactly what we were looking for! Maybe it would be nice to put the QgsPluginInstaller also into the official API documentation (or in the “Deploying QGIS within an organization” documentation)? I could imagine that others also try to establish an “autoinstall/autoupdate” scenario. Best regards, Josef Von: Alessandro Pasotti Gesendet: Mittwoch, 6. November 2019 12:21 An: Bauer.Josef extern IT-DS-TS Cc: QGIS Developer Mailing List Betreff: Re: [QGIS-Developer] Automatically install and update plugins On Wed, Nov 6, 2019 at 12:10 PM mailto:bauer.jo...@swm.de>> wrote: Hi Allesandro, thank you for the answer. That sounds very promising. I think that is what we need. But can you tell me what exact Python API we have to use? I can’t find anything related to that topic in the API documentation [0] (we are using the LTR version QGIS 3.4). Yeah, there is not much QGIS core API for plugins management, it's mainly done in the Python side: https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/installer.py [0] https://qgis.org/pyqgis/3.4/index.html Tanks und kind regards, Josef Von: Alessandro Pasotti mailto:apaso...@gmail.com>> Gesendet: Mittwoch, 6. November 2019 11:50 An: Bauer.Josef extern IT-DS-TS mailto:bauer.jo...@swm.de>> Cc: QGIS Developer Mailing List mailto:qgis-developer@lists.osgeo.org>> Betreff: Re: [QGIS-Developer] Automatically install and update plugins On Wed, Nov 6, 2019 at 11:38 AM mailto:bauer.jo...@swm.de>> wrote: Dear QGIS Developer, we have written some plugins that we would like to be installed and updated automatically (without any user interaction). We have also setup an internal plugins server. We can install the plugins from our plugin server manually, but is there also the possibility to install and update them without any user interactions (we have pre-configured the plugins in the QGIS3.ini)? basically, you need to create a custom startup py file and deploy it (it can also live on a network share), the startup script will contain the instructions (using the QGIS python API) to upgrade the plugins you need automatically. See the links for some more information: https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#the-startup-py-file https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html#deploying-qgis-within-an-organization Hope this helps. -- Alessandro Pasotti w3: www.itopen.it<http://www.itopen.it> -- Alessandro Pasotti w3: www.itopen.it<http://www.itopen.it> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Automatically install and update plugins
On Wed, Nov 6, 2019 at 12:10 PM wrote: > Hi Allesandro, > > > > thank you for the answer. That sounds very promising. I think that is what > we need. > > > > But can you tell me what exact Python API we have to use? I can’t find > anything related to that topic in the API documentation [0] (we are using > the LTR version QGIS 3.4). > > > Yeah, there is not much QGIS core API for plugins management, it's mainly done in the Python side: https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/installer.py > [0] https://qgis.org/pyqgis/3.4/index.html > > > > Tanks und kind regards, > > Josef > > > > *Von:* Alessandro Pasotti > *Gesendet:* Mittwoch, 6. November 2019 11:50 > *An:* Bauer.Josef extern IT-DS-TS > *Cc:* QGIS Developer Mailing List > *Betreff:* Re: [QGIS-Developer] Automatically install and update plugins > > > > > > > > On Wed, Nov 6, 2019 at 11:38 AM wrote: > > Dear QGIS Developer, > > > > we have written some plugins that we would like to be installed and > updated automatically (without any user interaction). We have also setup an > internal plugins server. We can install the plugins from our plugin server > manually, but is there also the possibility to install and update them > without any user interactions (we have pre-configured the plugins in the > QGIS3.ini)? > > > > > > basically, you need to create a custom startup py file and deploy it (it > can also live on a network share), the startup script will contain the > instructions (using the QGIS python API) > > to upgrade the plugins you need automatically. > > > > See the links for some more information: > > > > > https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#the-startup-py-file > > > https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html#deploying-qgis-within-an-organization > > > > > > Hope this helps. > > > > -- > > Alessandro Pasotti > w3: www.itopen.it > -- Alessandro Pasotti w3: www.itopen.it ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Automatically install and update plugins
Hi Allesandro, thank you for the answer. That sounds very promising. I think that is what we need. But can you tell me what exact Python API we have to use? I can’t find anything related to that topic in the API documentation [0] (we are using the LTR version QGIS 3.4). [0] https://qgis.org/pyqgis/3.4/index.html Tanks und kind regards, Josef Von: Alessandro Pasotti Gesendet: Mittwoch, 6. November 2019 11:50 An: Bauer.Josef extern IT-DS-TS Cc: QGIS Developer Mailing List Betreff: Re: [QGIS-Developer] Automatically install and update plugins On Wed, Nov 6, 2019 at 11:38 AM mailto:bauer.jo...@swm.de>> wrote: Dear QGIS Developer, we have written some plugins that we would like to be installed and updated automatically (without any user interaction). We have also setup an internal plugins server. We can install the plugins from our plugin server manually, but is there also the possibility to install and update them without any user interactions (we have pre-configured the plugins in the QGIS3.ini)? basically, you need to create a custom startup py file and deploy it (it can also live on a network share), the startup script will contain the instructions (using the QGIS python API) to upgrade the plugins you need automatically. See the links for some more information: https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#the-startup-py-file https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html#deploying-qgis-within-an-organization Hope this helps. -- Alessandro Pasotti w3: www.itopen.it<http://www.itopen.it> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Automatically install and update plugins
On Wed, Nov 6, 2019 at 11:38 AM wrote: > Dear QGIS Developer, > > > > we have written some plugins that we would like to be installed and > updated automatically (without any user interaction). We have also setup an > internal plugins server. We can install the plugins from our plugin server > manually, but is there also the possibility to install and update them > without any user interactions (we have pre-configured the plugins in the > QGIS3.ini)? > basically, you need to create a custom startup py file and deploy it (it can also live on a network share), the startup script will contain the instructions (using the QGIS python API) to upgrade the plugins you need automatically. See the links for some more information: https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#the-startup-py-file https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html#deploying-qgis-within-an-organization Hope this helps. -- Alessandro Pasotti w3: www.itopen.it ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer