tree: ef81f8cf0a7efc4f9729a2e027ee8f5f4b83b59a [path history] [tgz]
  1. example/
  2. fluss/
  3. src/
  4. Cargo.toml
  5. pyproject.toml
  6. README.md
bindings/python/README.md

Apache Fluss™ Python Bindings

Python bindings for Fluss using PyO3 and Maturin.

API Overview

Basic Usage

TODO: Add basic usage examples here

Core Classes

Config

Configuration for Fluss connection parameters

FlussConnection

Main interface for connecting to Fluss cluster

FlussAdmin

Administrative operations for managing tables (create, delete, etc.)

FlussTable

Represents a Fluss table, providing read and write operations

TableWriter

Used for writing data to tables, supports PyArrow and Pandas

LogScanner

Used for scanning table log data

Development

Requirements

  • Python 3.9+
  • Rust 1.70+
  • uv package manager
  • Linux or MacOS

⚠️ Before you start:
Please make sure you can successfully build and run the Fluss Rust client on your machine.
The Python bindings require a working Fluss Rust backend and compatible environment.

Install Development Dependencies

cd bindings/python
uv sync --all-extras

Build Development Version

source .venv/bin/activate
uv run maturin develop

Build Release Version

uv run maturin build --release

Code Formatting and Linting

uv run ruff format python/
uv run ruff check python/

Type Checking

uv run mypy python/

Run Examples

uv run python example/example.py

Build API docs:

uv run pdoc fluss

Release

# Build wheel
uv run maturin build --release

# Publish to PyPI
uv run maturin publish

Project Structure

bindings/python/
├── Cargo.toml            # Rust dependency configuration
├── pyproject.toml        # Python project configuration
├── README.md             # This file
├── src/                  # Rust source code
│   ├── lib.rs            # Main entry module
│   ├── config.rs         # Configuration related
│   ├── connection.rs     # Connection management
│   ├── admin.rs          # Admin operations
│   ├── table.rs          # Table operations
│   ├── types.rs          # Data types
│   └── error.rs          # Error handling
├── fluss/                # Python package source
│   ├── __init__.py       # Python package entry
│   ├── __init__.pyi      # Stub file
│   └── py.typed          # Type declarations
└── example/              # Example code
    └── example.py

License

Apache 2.0 License