Skip to content

Conversation

@Prajwal-banakar
Copy link
Contributor

Purpose

Linked issue: close #2447

The purpose of this change is to add comprehensive documentation for the Fluss Python Client. This ensures that Python users have a dedicated guide that mirrors the structure of the existing Java Client documentation while highlighting Python-specific features like PyArrow and Pandas integration.

Brief change log

This pull request introduces the following changes:

New Documentation File: Created website/docs/apis/python-client.md which includes sections for Installation, Initialization, Admin API, and Table API.

Code Examples: Added asynchronous Python code snippets demonstrating how to connect to a cluster, manage databases/tables, and perform high-performance data writing and scanning.

Ecosystem Integration: Documented the native support for PyArrow Tables and Pandas DataFrames, providing users with idiomatic ways to handle data in Python.

Sidebar Alignment: Set the sidebar_position to 2 to ensure the Python Client appears immediately after the Java Client in the API documentation hierarchy.

Build Consistency: Updated website/package-lock.json to reflect the environment-specific dependency tree used during local verification of the documentation site.

Tests

Manual Verification: The documentation was built and verified locally using the Docusaurus development server (npm run start).
Visual Check: Confirmed that all code blocks render correctly, syntax highlighting is active, and the sidebar navigation is correctly ordered.
Before
Screenshot 2026-01-23 224516

After changes
Screenshot 2026-01-23 224437

API and Format

This change does not affect any existing public Java APIs or storage formats; it is strictly a documentation addition for the Python Client.

Documentation

This PR introduces a new documentation page for the Fluss Python Client.

@Prajwal-banakar
Copy link
Contributor Author

Hi @polyzos , the build failed due to a NotLeaderOrFollowerException in FlussTableITCase, which seems unrelated to my documentation changes. Could you please review this PR and trigger a re-run?

Copy link
Contributor

@leekeiabstraction leekeiabstraction left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY for the PR. Added some comments/questions. PTAL!


# Create configuration
conf = Configuration()
conf.set_string("bootstrap.servers", "localhost:9123")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment here to adjust according to where Fluss is running

To use the Fluss Python client, you need to install the `fluss-python` package.

```bash
pip install fluss-python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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         

Comment on lines +43 to +44
table = connection.get_table("my_db.my_table")
print(table.get_table_info())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment on lines +53 to +56
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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm if these are currently honoured?

@Prajwal-banakar
Copy link
Contributor Author

Hi @leekeiabstraction, I have addressed all your feedback:

Updated the Installation section to point to the bindings/python directory in the fluss-rust repository.

Reordered the documentation so the Admin API (resource creation) comes before the Table API (usage) to ensure a smooth flow for fresh clusters.

Added the requested code comments to the initialization examples.

Verified the SASL configuration keys against the standard client setup.

PTAL when you have a chance. Thanks!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Add documentation for Python Client

2 participants