This is an automated email from the ASF dual-hosted git repository.
junma pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new d4a8e1164b4 Add initialization doc for CPP and Python client (#444)
d4a8e1164b4 is described below
commit d4a8e1164b4a29848b4d444e8b4d9cdf2ee241c8
Author: Zike Yang <[email protected]>
AuthorDate: Fri Mar 3 14:46:36 2023 +0800
Add initialization doc for CPP and Python client (#444)
---
docs/client-libraries-cpp-initialize.md | 12 +++++++++++-
docs/client-libraries-python-initialize.md | 14 +++++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/docs/client-libraries-cpp-initialize.md
b/docs/client-libraries-cpp-initialize.md
index 5dab9c2f394..43e2239f803 100644
--- a/docs/client-libraries-cpp-initialize.md
+++ b/docs/client-libraries-cpp-initialize.md
@@ -4,4 +4,14 @@ title: Initialize a C++ client object
sidebar_label: "Initialize"
---
-Coming soon...
\ No newline at end of file
+You can instantiate a Client object using just a URL for the target Pulsar
[cluster](reference-terminology.md#cluster) like this:
+
+```cpp
+Client client("pulsar://localhost:6650");
+```
+
+:::note
+
+If you run a cluster in [standalone mode](getting-started-standalone.md), the
broker is available at the `pulsar://localhost:6650` URL by default.
+
+:::
diff --git a/docs/client-libraries-python-initialize.md
b/docs/client-libraries-python-initialize.md
index e0efa9ac21a..5679cffe0e7 100644
--- a/docs/client-libraries-python-initialize.md
+++ b/docs/client-libraries-python-initialize.md
@@ -4,4 +4,16 @@ title: Initialize Python client
sidebar_label: "Initialize"
---
-Coming soon...
\ No newline at end of file
+You can instantiate a Client object using just a URL for the target Pulsar
[cluster](reference-terminology.md#cluster) like this:
+
+```python
+import pulsar
+
+client = pulsar.Client('pulsar://localhost:6650')
+```
+
+:::note
+
+If you run a cluster in [standalone mode](getting-started-standalone.md), the
broker is available at the `pulsar://localhost:6650` URL by default.
+
+:::