executemany

Python + MySQLdb executemany

I'm using Python and its MySQLdb module to import some measurement data into a Mysql database. The amount of data that we have is quite high (currently about ~250 MB of csv files and plenty of more to come). Currently I use cursor.execute(...) to import some metadata. This isn't problematic as there are only a few entries for these. Th...

How to select many rows from a dictionary (executemany select)

Hi everyone! I'm using Python and its MySQLdb module, is it possible to do a "selectmany"-like from a tuple/dictionary/list in the condition something like this: cursor.executemany("""SELECT * FROM customers WHERE name= %(name)s""",[d.__dict__ for d in data]) selected_rows = cursor.fecthall() doing a delete/update/insert works fin...