leekeiabstraction commented on code in PR #2461: URL: https://github.com/apache/fluss/pull/2461#discussion_r2749404557
########## website/docs/apis/python-client.md: ########## @@ -0,0 +1,213 @@ +--- +title: "Python Client" +sidebar_position: 2 Review Comment: Sidebar position 2 clashes with current position for `Client Support Matrix`. Update Client Support Matrix's to be larger. ########## website/docs/apis/python-client.md: ########## @@ -0,0 +1,213 @@ +--- +title: "Python Client" +sidebar_position: 2 +--- + +# Fluss Python Client + +## Overview +The Fluss Python Client provides an interface for interacting with Fluss clusters. It supports 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 +The Fluss Python client is provided as bindings within the Rust client repository. To install it from source: Review Comment: This might change soon if we decide to release artefacts for 0.1.0. nit: The Fluss Python client is **currently**... ########## website/docs/apis/python-client.md: ########## @@ -0,0 +1,213 @@ +--- +title: "Python Client" +sidebar_position: 2 +--- + +# Fluss Python Client + +## Overview +The Fluss Python Client provides an interface for interacting with Fluss clusters. It supports 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 +The Fluss Python client is provided as bindings within the Rust client repository. To install it from source: + +```bash +git clone https://github.com/apache/fluss-rust.git +cd fluss-rust/bindings/python +pip install . +``` + +## 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 Review Comment: Not a Python expert, but I run into the following error when importing the client package in python interpreter. (I'm on Mac). Am I missing something? ```bash keithlee@--- python % pip install . Processing /Users/keithlee/IdeaProjects/f/fluss-rust/bindings/python Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting pandas>=2.3.1 (from fluss==0.1.0) Downloading pandas-3.0.0-cp314-cp314-macosx_11_0_arm64.whl.metadata (79 kB) Collecting pyarrow>=10.0.0 (from fluss==0.1.0) Downloading pyarrow-23.0.0-cp314-cp314-macosx_12_0_arm64.whl.metadata (3.0 kB) Collecting numpy>=2.3.3 (from pandas>=2.3.1->fluss==0.1.0) Downloading numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl.metadata (6.6 kB) Collecting python-dateutil>=2.8.2 (from pandas>=2.3.1->fluss==0.1.0) Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB) Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas>=2.3.1->fluss==0.1.0) Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB) Downloading pandas-3.0.0-cp314-cp314-macosx_11_0_arm64.whl (9.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.9/9.9 MB 29.6 MB/s 0:00:00 Downloading numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl (5.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.2/5.2 MB 45.2 MB/s 0:00:00 Downloading pyarrow-23.0.0-cp314-cp314-macosx_12_0_arm64.whl (34.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.2/34.2 MB 54.9 MB/s 0:00:00 Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) Downloading six-1.17.0-py2.py3-none-any.whl (11 kB) Building wheels for collected packages: fluss Building wheel for fluss (pyproject.toml) ... done Created wheel for fluss: filename=fluss-0.1.0-cp314-cp314-macosx_11_0_arm64.whl size=4188845 sha256=bd436c60504f8b6e3e90775706d3f70227814149c080e85a836f5ff4387a11a8 Stored in directory: /private/var/folders/47/2p97sbt51xgdsqym52gn7cj80000gn/T/pip-ephem-wheel-cache-wg1s_vkk/wheels/d9/8f/5e/70d4bdfc4b18344a136d84aaa1fbc6c805c6b9ae074c3169c6 Successfully built fluss Installing collected packages: six, pyarrow, numpy, python-dateutil, pandas, fluss Successfully installed fluss-0.1.0 numpy-2.4.1 pandas-3.0.0 pyarrow-23.0.0 python-dateutil-2.9.0.post0 six-1.17.0 [notice] A new release of pip is available: 25.3 -> 26.0 [notice] To update, run: pip install --upgrade pip keithlee@--- python % python Python 3.14.2 (main, Dec 17 2025, 20:54:49) [Clang 21.1.4 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from fluss.client import Connection Traceback (most recent call last): File "<python-input-0>", line 1, in <module> from fluss.client import Connection File "/Users/keithlee/IdeaProjects/f/fluss-rust/bindings/python/fluss/__init__.py", line 18, in <module> from ._fluss import * ModuleNotFoundError: No module named 'fluss._fluss' ``` -- 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]
