Python Kafka Producer
Clone or download
russellmayhew Merge pull request #2 from urbanairship/lol-version
Local nosetests reported no issues; python test failed
Latest commit 39d4c80 Apr 18, 2014


pykafkap - Python Kafka Producer

A simple Kafka producer client for Python.


  • Producer only
  • Works as well for single connections as many connections in a threaded environment
  • Connection Pooling
  • Defensive network coding (short timeouts, tcp keepalives, connection recycling)
  • Kafka 0.05 and 0.6 support
  • Python 2.6 & 2.7 support (PyPy is bonus)


WIP - Should subclass KiddiePool and KiddieConnection to make sure they behave as intended for Kafka.

import kiddiepool
import kafkap
pool = kiddiepool.KiddiePool(['localhost:9092'])
client = kafkap.KafkaClient(pool)
client.send('message', 'topic')


Why the stupid name?
So we don't try to make it do more than we need. Who's going to try to bolt a consumer onto something with an ugly name like "pykafkap"?
Yeah, but then why did you name the module ""?
Putting "py" in the name of a Python module is redundant. Putting "py" in the name of a project namespaces it. See Q1.