summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kafka/__init__.py3
-rw-r--r--kafka/producer/__init__.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/kafka/__init__.py b/kafka/__init__.py
index 68ba597..80eb025 100644
--- a/kafka/__init__.py
+++ b/kafka/__init__.py
@@ -5,6 +5,7 @@ __license__ = 'Apache License 2.0'
__copyright__ = 'Copyright 2016 Dana Powers, David Arthur, and Contributors'
from kafka.consumer import KafkaConsumer
+from kafka.producer import KafkaProducer
from kafka.conn import BrokerConnection
from kafka.protocol import (
create_message, create_gzip_message, create_snappy_message)
@@ -28,7 +29,7 @@ class KafkaClient(SimpleClient):
__all__ = [
- 'KafkaConsumer', 'KafkaClient', 'BrokerConnection',
+ 'KafkaConsumer', 'KafkaProducer', 'KafkaClient', 'BrokerConnection',
'SimpleClient', 'SimpleProducer', 'KeyedProducer',
'RoundRobinPartitioner', 'HashedPartitioner',
'create_message', 'create_gzip_message', 'create_snappy_message',
diff --git a/kafka/producer/__init__.py b/kafka/producer/__init__.py
index bc0e7c6..3664eb2 100644
--- a/kafka/producer/__init__.py
+++ b/kafka/producer/__init__.py
@@ -1,6 +1,8 @@
+from .kafka import KafkaProducer
from .simple import SimpleProducer
from .keyed import KeyedProducer
__all__ = [
- 'SimpleProducer', 'KeyedProducer'
+ 'KafkaProducer',
+ 'SimpleProducer', 'KeyedProducer' # deprecated
]