leekeiabstraction commented on code in PR #2461:
URL: https://github.com/apache/fluss/pull/2461#discussion_r2723945094


##########
website/docs/apis/python-client.md:
##########
@@ -0,0 +1,218 @@
+---
+title: "Python Client"
+sidebar_position: 2
+---
+
+# Fluss Python Client
+
+## Overview
+The Fluss Python Client provides an interface for interacting with Fluss 
clusters. It supports both synchronous and asynchronous operations for managing 
resources and handling data.
+
+The client provides two main APIs:
+* **Admin API**: For managing databases, tables, partitions, and retrieving 
metadata.
+* **Table API**: For reading from and writing to Fluss tables.
+
+## Installation
+To use the Fluss Python client, you need to install the `fluss-python` package.
+
+```bash
+pip install fluss-python

Review Comment:
   I'm not a frequent python user, but is `fluss-python` available publicly?
   
   https://pypi.org/search/?q=fluss-python
   
   ```
   python-workspace % pip install fluss-python
   ERROR: Could not find a version that satisfies the requirement fluss-python 
(from versions: none)
   ERROR: No matching distribution found for fluss-python         
   ```



##########
website/docs/apis/python-client.md:
##########
@@ -0,0 +1,218 @@
+---
+title: "Python Client"
+sidebar_position: 2
+---
+
+# Fluss Python Client
+
+## Overview
+The Fluss Python Client provides an interface for interacting with Fluss 
clusters. It supports both synchronous and asynchronous operations for managing 
resources and handling data.
+
+The client provides two main APIs:
+* **Admin API**: For managing databases, tables, partitions, and retrieving 
metadata.
+* **Table API**: For reading from and writing to Fluss tables.
+
+## Installation
+To use the Fluss Python client, you need to install the `fluss-python` package.
+
+```bash
+pip install fluss-python
+```
+
+## Initialization
+
+The `Connection` object is the entry point for interacting with Fluss. It is 
created using `Connection.create()` and requires a configuration dictionary.
+
+```python
+from fluss.client import Connection
+from fluss.config import Configuration
+
+# Create configuration
+conf = Configuration()
+conf.set_string("bootstrap.servers", "localhost:9123")
+
+# Create connection
+connection = Connection(conf)
+
+# Obtain Admin instance
+admin = connection.get_admin()
+databases = admin.list_databases()
+print(databases)
+
+# Obtain Table instance
+table = connection.get_table("my_db.my_table")
+print(table.get_table_info())

Review Comment:
   While this follows the Java API flow, should we consider a flow that does 
not cause error as user follow it? If the server is a fresh one, would an Error 
occur here?



##########
website/docs/apis/python-client.md:
##########
@@ -0,0 +1,218 @@
+---
+title: "Python Client"
+sidebar_position: 2
+---
+
+# Fluss Python Client
+
+## Overview
+The Fluss Python Client provides an interface for interacting with Fluss 
clusters. It supports both synchronous and asynchronous operations for managing 
resources and handling data.
+
+The client provides two main APIs:
+* **Admin API**: For managing databases, tables, partitions, and retrieving 
metadata.
+* **Table API**: For reading from and writing to Fluss tables.
+
+## Installation
+To use the Fluss Python client, you need to install the `fluss-python` package.
+
+```bash
+pip install fluss-python
+```
+
+## Initialization
+
+The `Connection` object is the entry point for interacting with Fluss. It is 
created using `Connection.create()` and requires a configuration dictionary.
+
+```python
+from fluss.client import Connection
+from fluss.config import Configuration
+
+# Create configuration
+conf = Configuration()
+conf.set_string("bootstrap.servers", "localhost:9123")

Review Comment:
   Add comment here to adjust according to where Fluss is running



##########
website/docs/apis/python-client.md:
##########
@@ -0,0 +1,218 @@
+---
+title: "Python Client"
+sidebar_position: 2
+---
+
+# Fluss Python Client
+
+## Overview
+The Fluss Python Client provides an interface for interacting with Fluss 
clusters. It supports both synchronous and asynchronous operations for managing 
resources and handling data.
+
+The client provides two main APIs:
+* **Admin API**: For managing databases, tables, partitions, and retrieving 
metadata.
+* **Table API**: For reading from and writing to Fluss tables.
+
+## Installation
+To use the Fluss Python client, you need to install the `fluss-python` package.
+
+```bash
+pip install fluss-python
+```
+
+## Initialization
+
+The `Connection` object is the entry point for interacting with Fluss. It is 
created using `Connection.create()` and requires a configuration dictionary.
+
+```python
+from fluss.client import Connection
+from fluss.config import Configuration
+
+# Create configuration
+conf = Configuration()
+conf.set_string("bootstrap.servers", "localhost:9123")
+
+# Create connection
+connection = Connection(conf)
+
+# Obtain Admin instance
+admin = connection.get_admin()
+databases = admin.list_databases()
+print(databases)
+
+# Obtain Table instance
+table = connection.get_table("my_db.my_table")
+print(table.get_table_info())
+```
+
+### SASL Authentication
+If your Fluss cluster uses SASL authentication, configure the security 
properties:
+
+```python
+conf = Configuration()
+conf.set_string("bootstrap.servers", "localhost:9123")
+conf.set_string("client.security.protocol", "sasl")
+conf.set_string("client.security.sasl.mechanism", "PLAIN")
+conf.set_string("client.security.sasl.username", "alice")
+conf.set_string("client.security.sasl.password", "alice-secret")

Review Comment:
   Can you confirm if these are currently honoured?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to