Python MySQL prepared statements slower than regular queries
Much faster is to build a multi-row insert:

INSERT INTO t (a,b)
    VALUES
    (1,2),
    (11,23),
    (111,234), ...


On the MySQL side, this runs about 10 times as fast (for 100-1000 rows) than single-row inserts.