Skip to content

Commit 0844c0f

Browse files
committed
Update README.md with install instructions
1 parent c448bf3 commit 0844c0f

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ This project is very much alpha. The API is in flux and not all the features are
1616

1717
Install with your favorite package manager
1818

19+
Pip:
20+
21+
```shell
22+
git clone https://github.com/mumrah/kafka-python
23+
pip install kafka-python
24+
```
25+
26+
Setuptools:
27+
```shell
28+
git clone https://github.com/mumrah/kafka-python
29+
easy_install kafka-python
30+
```
31+
32+
Using `setup.py` directly:
33+
```shell
34+
git clone https://github.com/mumrah/kafka-python
35+
python setup.py install
36+
```
37+
1938
# Tests
2039

2140
## Run the unit tests
@@ -55,7 +74,7 @@ python -m test.integration
5574

5675
## Send several messages to a topic
5776

58-
Same as before, just add more arguments to `send_simple`
77+
Same as before, just add more arguments to `send\_simple`
5978

6079
```python
6180
kafka = KafkaClient("localhost", 9092)
@@ -65,7 +84,7 @@ Same as before, just add more arguments to `send_simple`
6584

6685
## Recieve some messages from a topic
6786

68-
Supply `get_message_set` with a `FetchRequest`, get back the messages and new `FetchRequest`
87+
Supply `get\_message\_set` with a `FetchRequest`, get back the messages and new `FetchRequest`
6988

7089
```python
7190
kafka = KafkaClient("localhost", 9092)
@@ -79,7 +98,7 @@ paging through the queue very simple.
7998

8099
## Send multiple messages to multiple topics
81100

82-
For this we use the `send_multi_message_set` method along with `ProduceRequest` objects.
101+
For this we use the `send\_multi\_message\_set` method along with `ProduceRequest` objects.
83102

84103
```python
85104
kafka = KafkaClient("localhost", 9092)
@@ -97,7 +116,7 @@ For this we use the `send_multi_message_set` method along with `ProduceRequest`
97116

98117
## Iterate through all messages from an offset
99118

100-
The `iter_messages` method will make the underlying calls to `get_message_set`
119+
The `iter\_messages` method will make the underlying calls to `get\_message\_set`
101120
to provide a generator that returns every message available.
102121

103122
```python
@@ -116,5 +135,4 @@ An optional `auto` argument will control auto-paging through results
116135
kafka.close()
117136
```
118137

119-
This will only iterate through messages in the byte range of
120-
(0, 1024\*1024)
138+
This will only iterate through messages in the byte range of (0, 1024\*1024)

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
url="https://github.com/mumrah/kafka-python",
99
packages=["kafka"],
1010
license="Copyright 2012, David Arthur under Apache License, v2.0",
11+
description="Pure Python client for Apache Kafka",
1112
long_description=open("README.md").read(),
1213
)

0 commit comments

Comments
 (0)