title: kafka-python - How do I commit a partition?
body: <p>Using kafka-python-1.0.2.</p>
  
  <p>If I have a topic with 10 partitions, how do I go about committing a particular partition, while looping through the various partitions and messages. I just cant seem find an example of this anywhere, in the docs or otherwise</p>
  
  <p>From the docs, I want to use: </p>
  
  <p><code>consumer.commit(offset=offsets)</code></p>
  
  <p>Specifically, how do I create the partition and OffsetAndMetadata dictionary required for offsets (dict, optional) – {TopicPartition: OffsetAndMetadata}.</p>
  
  <p>I was hoping the function call would just be something like: </p>
  
  <p><code>consumer.commit(partition, offset)</code></p>
  
  <p>but this does not seem to be the case.</p>
  
  <p>Thanks in advance.</p>