LangChain integration for Sail — a Rust-based drop-in replacement for Spark
Project description
langchain-sail
LangChain integration for Sail, a drop-in replacement for Apache Spark.
Installation
pip install langchain-sail
To run a local Sail server for development/testing:
pip install pysail
Usage
from pysail.spark import SparkConnectServer
from pyspark.sql import SparkSession
from langchain_sail import SailSQL, SailSQLToolkit, create_sail_sql_agent
# Start a local Sail server
server = SparkConnectServer()
server.start()
_, port = server.listening_address
# Connect via SailSQL
spark = SparkSession.builder.remote(f"sc://localhost:{port}").getOrCreate()
sail = SailSQL(spark_session=spark)
# Use with an LLM agent
from langchain_anthropic import ChatAnthropic
llm = ChatAnthropic(model="claude-sonnet-4-6")
toolkit = SailSQLToolkit(db=sail, llm=llm)
agent = create_sail_sql_agent(llm=llm, toolkit=toolkit, verbose=True)
result = agent.invoke({"input": "What tables are available?"})
print(result["output"])
What is Sail?
Sail is a drop-in replacement for Apache Spark, written in Rust. It uses the Spark Connect protocol, so existing PySpark code works out of the box — just point your SparkSession at a Sail server instead of a Spark cluster.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_sail-0.2.0.tar.gz.
File metadata
- Download URL: langchain_sail-0.2.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce2549eb9978821f62e1881c3eed834c72aee299112b28786a00ef73e3c8dd40
|
|
| MD5 |
b2dd87bb5bf3dda7701a66bc45c2c9fc
|
|
| BLAKE2b-256 |
de1b500114977633075c318d8e2821046231cb1060172e78d1ac7d33db4eb966
|
Provenance
The following attestation bundles were made for langchain_sail-0.2.0.tar.gz:
Publisher:
release.yml on lakehq/langchain-sail
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_sail-0.2.0.tar.gz -
Subject digest:
ce2549eb9978821f62e1881c3eed834c72aee299112b28786a00ef73e3c8dd40 - Sigstore transparency entry: 1213582536
- Sigstore integration time:
-
Permalink:
lakehq/langchain-sail@9e75d455e64b9b30fb38dc12117ca343609b71ca -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/lakehq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e75d455e64b9b30fb38dc12117ca343609b71ca -
Trigger Event:
push
-
Statement type:
File details
Details for the file langchain_sail-0.2.0-py3-none-any.whl.
File metadata
- Download URL: langchain_sail-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a7cf02104cff0523dee29ace909a82353e434afcbd3ea8080cca047a322d6c6
|
|
| MD5 |
b3ff98bc8b2004ce67c676dd60e81250
|
|
| BLAKE2b-256 |
c2a7bc51462c3be085eb58e61c1cf42e44bd34d1da74964ea0995b73b23e258c
|
Provenance
The following attestation bundles were made for langchain_sail-0.2.0-py3-none-any.whl:
Publisher:
release.yml on lakehq/langchain-sail
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_sail-0.2.0-py3-none-any.whl -
Subject digest:
9a7cf02104cff0523dee29ace909a82353e434afcbd3ea8080cca047a322d6c6 - Sigstore transparency entry: 1213582601
- Sigstore integration time:
-
Permalink:
lakehq/langchain-sail@9e75d455e64b9b30fb38dc12117ca343609b71ca -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/lakehq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e75d455e64b9b30fb38dc12117ca343609b71ca -
Trigger Event:
push
-
Statement type: