This is an automated email from the ASF dual-hosted git repository.
xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 5e42e4d82a4 docs: Updating Python installation section (#17796)
5e42e4d82a4 is described below
commit 5e42e4d82a4ffc3298023c8cbce4adfb6867d6ad
Author: tison <[email protected]>
AuthorDate: Tue Sep 27 16:15:51 2022 +0800
docs: Updating Python installation section (#17796)
---
site2/docs/client-libraries-cpp.md | 2 +-
site2/docs/client-libraries-python.md | 45 ++++++++++-------------------------
2 files changed, 13 insertions(+), 34 deletions(-)
diff --git a/site2/docs/client-libraries-cpp.md
b/site2/docs/client-libraries-cpp.md
index 05c24a17d2b..027644b007d 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
diff --git a/site2/docs/client-libraries-python.md
b/site2/docs/client-libraries-python.md
index 8e4358fee83..6d45547aab2 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](/api/python) for the Python client.
-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