langchain-sail
LangChain integration for Sail, a drop-in replacement for Apache Spark.
Installation
For the recommended lightweight Spark Connect client:
pip install "langchain-sail[spark]"
This installs pyspark-client==4.2.0 without the JVM components included in the full PySpark distribution.
If you need a different PySpark version, install the base package and your preferred PySpark distribution separately:
pip install langchain-sail
To run a local Sail server for development or testing, also install pysail:
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.
Metadata
Release files for langchain-sail 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_sail-0.2.1.tar.gz | 13.7 kB | With provenance | Details for langchain_sail-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_sail-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for langchain_sail-0.2.1-py3-none-any.whl |
Total release size: 30.9 kB
Release files / langchain_sail-0.2.1.tar.gz
| Download URL | langchain_sail-0.2.1.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
596f2b1c9c4b787708a47564d9076bba1ae96d02c9b45e4582baa1c85cc8c25b
|
|
BLAKE2b-256 checksum How to use checksums |
2fe337a36d16f6e47df73d96285c883906913138ccc84db5937bf49dbfcc8407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logRelease files / langchain_sail-0.2.1-py3-none-any.whl
| Download URL | langchain_sail-0.2.1-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65d14d3a7b00b09bab6548e5ff44d19df688e7bb4be1a4adb7d89e8d8c86b272
|
|
BLAKE2b-256 checksum How to use checksums |
f1a5b82c1e0cbee6e5200fc996127f6407d35ea4e33ef441f266f2a2d721041c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logSecurity for langchain-sail 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for langchain_sail-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.