client = SimpleClient(brokers)
partitions = client.topic_partitions[topic]
offset_requests = [OffsetRequestPayload(topic, p, -1, 1) for p in
    list(partitions.keys())]
offsets_responses = client.send_offset_request(offset_requests)
for r in offsets_responses:
    pass
How to get latest offset for a partition for a kafka topic?