Skip to content

Commit 64ee775

Browse files
committed
Revamp README
1 parent bdc870a commit 64ee775

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ with Apache Kafka at its core. It's high priority for us that client features ke
2424
pace with core Apache Kafka and components of the [Confluent Platform](https://www.confluent.io/product/compare/).
2525

2626
The Python bindings provides a high-level Producer and Consumer with support
27-
for the balanced consumer groups of Apache Kafka 0.9.
27+
for the balanced consumer groups of Apache Kafka >= 0.9.
2828

2929
See the [API documentation](http://docs.confluent.io/current/clients/confluent-kafka-python/index.html) for more info.
3030

@@ -42,6 +42,7 @@ from confluent_kafka import Producer
4242
p = Producer({'bootstrap.servers': 'mybroker,mybroker2'})
4343
for data in some_data_source:
4444
p.produce('mytopic', data.encode('utf-8'))
45+
p.poll(0)
4546
p.flush()
4647
```
4748

@@ -124,9 +125,8 @@ version it may use. This is done through two configuration settings:
124125

125126
When using a Kafka 0.10 broker or later you don't need to do anything
126127
(`api.version.request=true` is the default).
127-
If you use Kafka broker 0.9 or 0.8 you must set
128-
`api.version.request=false` and set
129-
`broker.version.fallback` to your broker version,
128+
If you use Kafka broker 0.9 or 0.8 you must set `api.version.request=false`
129+
and set `broker.version.fallback` to your broker version,
130130
e.g `broker.version.fallback=0.9.0.1`.
131131

132132
More info here:
@@ -136,33 +136,39 @@ https://github.com/edenhill/librdkafka/wiki/Broker-version-compatibility
136136
Prerequisites
137137
=============
138138

139-
* Python >= 2.6 or Python 3.x
140-
* [librdkafka](https://github.com/edenhill/librdkafka) >= 0.9.1 (embedded in Linux wheels)
139+
* Python >= 2.7 or Python 3.x
140+
* ([librdkafka](https://github.com/edenhill/librdkafka) >= 0.9.2)
141141

142-
librdkafka is embedded in the manylinux wheels, for other platforms or
143-
when a specific version of librdkafka is desired, following these guidelines:
142+
The latest version of librdkafka is embedded in the OSX and manylinux wheels,
143+
for other platforms or when a specific version of librdkafka is desired, follow these guidelines:
144144

145-
* For **Debian/Ubuntu**** based systems, add this APT repo and then do `sudo apt-get install librdkafka-dev python-dev`:
145+
* For **Debian/Ubuntu** based systems, add the Confluent APT repository and then do `sudo apt-get install librdkafka-dev python-dev`:
146146
http://docs.confluent.io/current/installation.html#installation-apt
147147

148-
* For **RedHat** and **RPM**-based distros, add this YUM repo and then do `sudo yum install librdkafka-devel python-devel`:
148+
* For **RedHat** and **RPM**-based distros, add the Confluent YUM repository and then do `sudo yum install librdkafka-devel python-devel`:
149149
http://docs.confluent.io/current/installation.html#rpm-packages-via-yum
150150

151151
* On **OSX**, use **homebrew** and do `sudo brew install librdkafka`
152152

153+
**NOTE:** The pre-built manylinux wheels do NOT contain SASL Kerberos support. If you need SASL Kerberos support you must install librdkafka and its dependencies using the above repositories and then build confluent-kafka from source using the instructions below.
154+
153155

154156
Install
155157
=======
156158

157-
**Install from PyPi:**
159+
**Install self-contained binary wheels for OSX and Linux from PyPi:**
158160

159161
$ pip install confluent-kafka
160162

161-
# for AvroProducer or AvroConsumer
163+
**Install AvroProducer and AvroConsumer:**
164+
162165
$ pip install confluent-kafka[avro]
163166

167+
**Install from source from PyPi** *(requires librdkafka + dependencies to be installed separately)*:
168+
169+
$ pip install --no-binary :all: confluent-kafka
164170

165-
**Install from source / tarball:**
171+
**Install from source directory:**
166172

167173
$ pip install .
168174

0 commit comments

Comments
 (0)