<div dir="ltr">What you are looking for is 'Processing Algorithms' or 'Processing Scripts'. When you write a new algorithm using the Processing Framework, the algorithm is available in the Processing Toolbox and can be used in models, batch processing, or standalone tool. QGIS also includes a 'qgis_process' tool that can execute processing algorithms from command-line without launching the qgis gui. <div><br></div><div>You can also write a standalone pyqgis script that can be run on servers/headless mode without QGIS GUI.</div><div><br></div><div>For dev environments, you can use PyQGIS with Pycharm, VSCode, Jupyter etc. by setting your paths correctly. You can also install QGIS using conda and use it from the conda environment (which removes the hassle of setting python paths)</div><div><br></div><div> Sharing some resources<br></div><div><br></div><div>Writing Processing Scripts <a href="https://docs.qgis.org/3.16/en/docs/user_manual/processing/scripts.html" target="_blank">https://docs.qgis.org/3.16/en/docs/user_manual/processing/scripts.html</a></div><div>qgis_process tool: <a href="https://bnhr.xyz/2020/07/17/run-qgis-algorithms-command-line.html" target="_blank">https://bnhr.xyz/2020/07/17/run-qgis-algorithms-command-line.html</a></div><div>writing standalone pyqgis scripts <a href="https://courses.spatialthoughts.com/pyqgis-in-a-day.html#writing-standalone-python-scripts" target="_blank">https://courses.spatialthoughts.com/pyqgis-in-a-day.html#writing-standalone-python-scripts</a></div><div>VSCode PyQGIS setup <a href="https://gis.stackexchange.com/a/330646/5160">https://gis.stackexchange.com/a/330646/5160</a></div><div>QGIS with Conda <a href="https://gisunchained.wordpress.com/2019/05/29/using-qgis-from-conda/">https://gisunchained.wordpress.com/2019/05/29/using-qgis-from-conda/</a></div><div><br></div><div><br><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div><div><table cellpadding="0" cellspacing="0" style="border-spacing:0px;border-collapse:collapse;color:rgb(68,68,68);width:480px;font-size:10pt;font-family:Arial,sans-serif;line-height:normal"><tbody><tr><td valign="top" style="padding:10px 0px 12px;width:160px;vertical-align:top"><a href="https://spatialthoughts.com/" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img border="0" alt="Logo" width="141" src="https://spatialthoughts685850346.files.wordpress.com/2019/12/spatial_thoughts_logo.png" style="border:0px;vertical-align:middle;width:141px;height:auto"></a></td><td style="padding:6px 0px;width:320px"><table cellpadding="0" cellspacing="0" style="border-spacing:0px;border-collapse:collapse;background-color:transparent"><tbody><tr><td style="padding:0px;font-size:12pt;font-family:Arial,sans-serif;font-weight:bold;color:rgb(61,60,63)"><span style="color:rgb(0,175,239)">Ujaval Gandhi</span></td></tr><tr><td style="padding:0px 0px 11px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(61,60,63)"><span style="color:rgb(0,175,239)">Spatial Thoughts</span></td></tr><tr><td style="padding:0px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(155,155,155)"><span>mobile: +91-8095684687</span></td></tr><tr><td style="padding:0px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(155,155,155)"><span>email: </span><span style="color:rgb(23,147,210)"><a href="mailto:ujaval@spatialthoughts.com" target="_blank">ujaval@spatialthoughts.com</a></span></td></tr><tr><td style="padding:6px 0px 0px"><span style="display:inline-block;height:22px"><span><a href="https://www.linkedin.com/in/spatialthoughts/" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img alt="LinkedIn icon" border="0" width="23" height="23" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator/elegant-logo/ln.png" style="border:0px;vertical-align:middle;height:20px;width:20px"></a>  </span><span><a href="https://twitter.com/spatialthoughts" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img alt="Twitter icon" border="0" width="23" height="23" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator/elegant-logo/tt.png" style="border:0px;vertical-align:middle;height:20px;width:20px"></a>  </span></span></td></tr></tbody></table></td></tr><tr><td colspan="2" style="padding:8px 0px 0px;border-top:1px solid rgb(23,147,210);width:480px;font-family:Arial,sans-serif;color:rgb(155,155,155);text-align:justify"></td></tr></tbody></table><br></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 26, 2021 at 8:31 AM Andrew Hughes <<a href="mailto:ahhughes@gmail.com" target="_blank">ahhughes@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>I've spent the best part of the morning trying and getting nowhere working out the following when developing python algorithms</div><div><br></div><div>In order of priority, my questions are - How can I...</div><div><br></div><div>Q: develop+run/debug algorithms in VSCode?</div><div>Q: run the python algorithm on the command line (without starting the QGIS GUI) - this is for automation (non-human) driven execution?</div><div>Q: display the algorithm in the QGIS processing panel, and execute it - for human driven execution.</div><div>Q: incorporate the algorithm in QGIS processing models?</div><div><br></div><div>I am hoping there is an online guide or public project I have not been able to find yet that someone can point me to.</div><div><br></div><div>For reference: I'm trying to process large volumes of data that I would like to 'migrate' across to openstreet map exports. Given the size of the data, I feel like I need to start writing bespoke algorithms that will iterate feature-by-feature and have more control over what is happening during the execution.</div><div><br></div><div>Many thank in advance</div><div>Andrew</div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>