i dont know much about marlin or how to use the pythonscripts, but with the W5500 branch from Drew, we have been copying grblhal, which has proven to be a good model. You can select build environment in the PIO extension and it will syntax highlight based on the build environment, or just build all of them. For the F4 branch, we didnt even need to make PIO board variants because most generic ones were included. Since there arent even that many options(clock, spi channel, etc), Drew threw them all out there for me at the beginning and I just had to add some defs and configure some stuff. Have a look at our other repo, I have been mashing this + grblhal into your new thing, and to try and work.
github.com/cakeslob/Remora-STM32F4xx-W55.../f429/platformio.ini
So far on the W5500 one, he had a bunch of SPI DMA options already included ( SPI1, SPI1-ALT, SPI2, etc), the common clock configs and I just mashed some defs and boards. I dont have it very clean but I was able to support all the other remora boards pretty easy.