Skip to content

Commit

Permalink
Merge pull request #4874 from RasaHQ/kafka-extras
Browse files Browse the repository at this point in the history
`kafka-python` as extra dependency
  • Loading branch information
ricwo committed Dec 3, 2019
2 parents c977280 + 0b0e0bc commit 75f7cd3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
6 changes: 6 additions & 0 deletions changelog/4751.improvement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The ``kafka-python`` dependency has become as an "extra" dependency. To use the
``KafkaEventConsumer``, ``rasa`` has to be installed with the ``[kafka]`` option, i.e.

.. code-block:: bash
$ pip install rasa[kafka]
16 changes: 13 additions & 3 deletions docs/api/event-brokers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,19 @@ example:
Kafka Event Broker
------------------

It is possible to use `Kafka <https://kafka.apache.org/>`_ as main broker for your events. In this example
we are going to use the `python-kafka <https://kafka-python.readthedocs.io/en/master/usage.html>`_
library, a Kafka client written in Python.
It is possible to use `Kafka <https://kafka.apache.org/>`_ as main broker for your
events. In this example we are going to use the `python-kafka <https://kafka-python
.readthedocs.io/en/master/usage.html>`_ library, a Kafka client written in Python.

.. note::

In order to use the Kafka event broker, ``rasa`` has to be installed with the
``kafka`` option:

.. code-block:: bash
$ pip install rasa[kafka]
Adding a Kafka Event Broker Using the Endpoint Configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ python-engineio==3.9.3
pydot==1.4.1
async_generator==1.10
SQLAlchemy~=1.3.3
kafka-python==1.4.6
kafka-python==1.4.7
sklearn-crfsuite==0.3.6
psycopg2-binary==2.8.2
PyJWT==1.7.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"pydot~=1.4",
"async_generator~=1.10",
"SQLAlchemy~=1.3.0",
"kafka-python~=1.4",
"sklearn-crfsuite~=0.3.6",
"PyJWT~=1.7",
# remove when tensorflow@1.15.x or a pre-release patch is released
Expand All @@ -95,6 +94,7 @@
"convert": ["tensorflow_text~=1.15.1", "tensorflow_hub~=0.6.0"],
"mitie": ["mitie"],
"sql": ["psycopg2~=2.8.2", "SQLAlchemy~=1.3"],
"kafka": ["kafka-python~=1.4"],
}

setup(
Expand Down

0 comments on commit 75f7cd3

Please sign in to comment.