I have a problem with KiCad's python API (5.1), I cannot find a way to add a component onto the PCB.
I found some examples but they no longer work with the version of KiCad I am using. The next step is going through the C++ code to understand how a component is placed on the board, but before that, I thought was worth asking for help here.
Adding a component is quite easy, just instantiate a module and place it on the board.
But be aware that you cannot add the same module multiple times, you have to create multiple modules. I found this out with hours of debugging.