I have a working version of my script that I use to create Lattice Fpgas. It is on github.com, user ouabache repo librepcb-parts-generator branch bga. You can try it out if you like.
It can be used to create any component with a rectangular symbol. Create a csv file with one row per pin. Pin name in the first column, L,R,T,B in the second and pin number in the third. Pin numbers must match the packages pin names.
Look at the make_lattice script to see how to call it