def my_iter(x):
    for i in range(x):
        yield i, i * i
cursor.executemany('INSERT INTO my_table VALUES (?, ?)', my_iter(100))
How do I use prepared statements for inserting MULTIPLE records in SQlite using Python / Django?