From 6740b0e862f0cb9715c6404cee9767bd189e967a Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 22 Sep 2022 15:37:31 +0800 Subject: [PATCH 1/4] docs: Updating Python installation section Signed-off-by: tison --- site2/docs/client-libraries-python.md | 45 +++++++-------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/site2/docs/client-libraries-python.md b/site2/docs/client-libraries-python.md index 8e4358fee83f1..7aa3b2d543326 100644 --- a/site2/docs/client-libraries-python.md +++ b/site2/docs/client-libraries-python.md @@ -9,29 +9,21 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; ```` +You can use a Pulsar Python client to create producers, consumers, and readers. -Pulsar Python client library is a wrapper over the existing [C++ client library](client-libraries-cpp.md) and exposes all of the [same features](/api/cpp). You can find the code in the [Python directory](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp/python) of the C++ client code. +All the methods in producer, consumer, and reader of a Python client are thread-safe. You can read the API docs for the Python client are available [here](/api/python). -All the methods in producer, consumer, and reader of a Python client are thread-safe. +## Installation -pdoc-generated API docs for the Python client are available [here](/api/python). +Use [pip](https://pip.pypa.io/) to install the latest version: -## Install - -You can install the [`pulsar-client`](https://pypi.python.org/pypi/pulsar-client) library either via [PyPi](https://pypi.python.org/pypi), using [pip](#installation-using-pip), or by building the library from [source](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp). - -### Install using pip - -To install the `pulsar-client` library as a pre-built package using the [pip](https://pip.pypa.io/en/stable/) package manager: - -```shell -pip install pulsar-client==@pulsar:version_number@ +```bash +pip install 'pulsar-client==@pulsar:version_number@' ``` -### Optional dependencies -If you install the client libraries on Linux to support services like Pulsar functions or Avro serialization, you can install optional components alongside the `pulsar-client` library. +You can install optional components alongside the client library: -```shell +```bash # avro serialization pip install 'pulsar-client[avro]==@pulsar:version_number@' @@ -44,23 +36,10 @@ pip install 'pulsar-client[all]==@pulsar:version_number@' Installation via PyPi is available for the following Python versions: -Platform | Supported Python versions -:--------|:------------------------- -MacOS >= 11.0 | 3.7, 3.8, 3.9 and 3.10 -Linux (including Alpine Linux) | 3.7, 3.8, 3.9 and 3.10 - - -### Install from source - -To install the `pulsar-client` library by building from source, follow [instructions](client-libraries-cpp.md#compilation) and compile the Pulsar C++ client library. That builds the Python binding for the library. - -To install the built Python bindings: - -```shell -git clone https://github.com/apache/pulsar -cd pulsar/pulsar-client-cpp/python -sudo python setup.py install -``` +| Platform | Supported Python versions | +|:-------------------------------|:--------------------------| +| macOS (>= 11.0) | 3.7, 3.8, 3.9 and 3.10 | +| Linux (including Alpine Linux) | 3.7, 3.8, 3.9 and 3.10 | ## Connection URLs From f64cad81c5679f83cfc6c6a263d353c0787eaa9e Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 22 Sep 2022 15:49:37 +0800 Subject: [PATCH 2/4] Update site2/docs/client-libraries-python.md --- site2/docs/client-libraries-python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/docs/client-libraries-python.md b/site2/docs/client-libraries-python.md index 7aa3b2d543326..3870e998b0857 100644 --- a/site2/docs/client-libraries-python.md +++ b/site2/docs/client-libraries-python.md @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; You can use a Pulsar Python client to create producers, consumers, and readers. -All the methods in producer, consumer, and reader of a Python client are thread-safe. You can read the API docs for the Python client are available [here](/api/python). +All the methods in producer, consumer, and reader of a Python client are thread-safe. You can read the API docs for the Python client [here](/api/python). ## Installation From bb79933c0ac3729a551f299bdad642a624394190 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 22 Sep 2022 15:50:28 +0800 Subject: [PATCH 3/4] Update site2/docs/client-libraries-python.md --- site2/docs/client-libraries-python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/docs/client-libraries-python.md b/site2/docs/client-libraries-python.md index 3870e998b0857..6d45547aab2fa 100644 --- a/site2/docs/client-libraries-python.md +++ b/site2/docs/client-libraries-python.md @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; You can use a Pulsar Python client to create producers, consumers, and readers. -All the methods in producer, consumer, and reader of a Python client are thread-safe. You can read the API docs for the Python client [here](/api/python). +All the methods in producer, consumer, and reader of a Python client are thread-safe. You can read the [API docs](/api/python) for the Python client. ## Installation From 1e26cb4b6a4b1828b5c610034d971310a0f4094b Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 22 Sep 2022 15:51:28 +0800 Subject: [PATCH 4/4] update cpp similar sentences Signed-off-by: tison --- site2/docs/client-libraries-cpp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/docs/client-libraries-cpp.md b/site2/docs/client-libraries-cpp.md index 05c24a17d2be1..027644b007dec 100644 --- a/site2/docs/client-libraries-cpp.md +++ b/site2/docs/client-libraries-cpp.md @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; You can use a Pulsar C++ client to create producers, consumers, and readers. -All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client +All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the [API docs](/api/cpp) for the C++ client. ## Installation