diff options
author | David Arthur <mumrah@gmail.com> | 2012-10-02 12:20:57 -0400 |
---|---|---|
committer | David Arthur <mumrah@gmail.com> | 2012-10-02 12:20:57 -0400 |
commit | c448bf367036d3a3c04ee553987da6be64820d00 (patch) | |
tree | 56d0b92f5c389251376b72901daf9d22a0caf454 | |
parent | c99d4119f2d6d0fdee38a159e1c845e42cf398b1 (diff) | |
download | kafka-python-c448bf367036d3a3c04ee553987da6be64820d00.tar.gz |
Renaming kafka.py to client.py
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | example.py | 3 | ||||
-rw-r--r-- | kafka/client.py (renamed from kafka/kafka.py) | 0 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | test/integration.py | 2 | ||||
-rw-r--r-- | test/unit.py | 2 |
6 files changed, 9 insertions, 5 deletions
@@ -12,6 +12,10 @@ Copyright 2012, David Arthur under Apache License, v2.0. See `LICENSE` This project is very much alpha. The API is in flux and not all the features are fully implemented. +# Install + +Install with your favorite package manager + # Tests ## Run the unit tests @@ -43,6 +47,7 @@ python -m test.integration ## Send a message to a topic ```python + from kafka.client import KafkaClient kafka = KafkaClient("localhost", 9092) kafka.send_messages_simple("my-topic", "some message") kafka.close() @@ -1,6 +1,6 @@ import logging -from kafka import KafkaClient, FetchRequest, ProduceRequest +from kafka.client import KafkaClient, FetchRequest, ProduceRequest def produce_example(kafka): message = kafka.create_message("testing") @@ -26,7 +26,6 @@ def main(): consume_example(kafka) kafka.close() - if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) main() diff --git a/kafka/kafka.py b/kafka/client.py index 0cde87f..0cde87f 100644 --- a/kafka/kafka.py +++ b/kafka/client.py @@ -1,7 +1,7 @@ from distutils.core import setup setup( - name="Kafka Python Client", + name="kafka-python", version="0.1-alpha", author="David Arthur", author_email="mumrah@gmail.com", diff --git a/test/integration.py b/test/integration.py index 197f5ec..03e988e 100644 --- a/test/integration.py +++ b/test/integration.py @@ -11,7 +11,7 @@ from threading import Thread, Event import time import unittest -from kafka.kafka import KafkaClient, ProduceRequest, FetchRequest +from kafka.client import KafkaClient, ProduceRequest, FetchRequest def get_open_port(): sock = socket.socket() diff --git a/test/unit.py b/test/unit.py index 2db0857..6ca3564 100644 --- a/test/unit.py +++ b/test/unit.py @@ -3,7 +3,7 @@ import random import struct import unittest -from kafka.kafka import KafkaClient, ProduceRequest, FetchRequest, length_prefix_message +from kafka.client import KafkaClient, ProduceRequest, FetchRequest, length_prefix_message from kafka.codec import gzip_encode, gzip_decode ITERATIONS = 1000 |