I've been working on a project using QGIS's Python API. I need to create an in-memory layer that is defined as the difference between two polygonal vector layers, but I'm having difficulty figuring out how to do this for a standalone script.
I've looked at the processing plugin, but it seems to require a file output. I've seen that some people use the runandload() function (How to load memory output from QGIS processing?), but this seems to be specifically for the QGIS GUI console, and I'm needing to generate the output layer in memory.