title: SQLAlchemy insert list of dictionarys by batches
body: <p>Im reading a file and constructing dictionarys per row read.</p>
  
  <p>In a for loop im appending to a list those dictionarys, when the <code>len(list)</code> is bigger at 10K, i send the list to <code>con.execute(add.insert(list))</code> and clean the list.
  The problem is the last list of dictionarys is not a 10K so i miss inserting the last batch.</p>
  
  <p>I dont dont think building and inmemory large list of dictionarys and then iterate over the list would be a performatic way of handling this.   </p>
  
  <p>Is there a method in SQLAlchemy where i just send the dictionarys and set the size limit of the batch size so it handles the load by itself ? Or another workaround ...</p>
  
  <pre><code>    chunks.append(data_dict)
      if len(chunks) == 10000:
          con.execute(add.insert(chunks))
          del chunks[:]
  </code></pre>
  
  <p>.newb slqalchemy learner</p>