LangGraph Checkpoint MSSQL
Implementation of LangGraph CheckpointSaver that uses Microsoft SQL Server.
Installation
pip install langgraph-checkpoint-mssql
Dependencies
Requires the Microsoft ODBC Driver for SQL Server. Install it from:
- Linux: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server
- macOS: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos
- Windows: https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
Usage
[!IMPORTANT] When using the MSSQL checkpointer for the first time, make sure to call
.setup()method to create the required tables.
from langgraph.checkpoint.mssql import MSSQLSaver
write_config = {"configurable": {"thread_id": "1", "checkpoint_ns": ""}}
read_config = {"configurable": {"thread_id": "1"}}
DB_URI = "mssql+pyodbc://sa:password@localhost:1433/master?driver=ODBC+Driver+18+for+SQL+Server"
with MSSQLSaver.from_conn_string(DB_URI) as checkpointer:
# call .setup() the first time you're using the checkpointer
checkpointer.setup()
# store checkpoint
checkpointer.put(write_config, checkpoint, {}, {})
# load checkpoint
checkpointer.get(read_config)
# list checkpoints
list(checkpointer.list(read_config))
Async
from langgraph.checkpoint.mssql.aio import AsyncMSSQLSaver
async with AsyncMSSQLSaver.from_conn_string(DB_URI) as checkpointer:
await checkpointer.setup()
# store checkpoint
await checkpointer.aput(write_config, checkpoint, {}, {})
# load checkpoint
await checkpointer.aget(read_config)
# list checkpoints
[c async for c in checkpointer.alist(read_config)]
Connection String Format
mssql+pyodbc://USER:PASSWORD@HOST:PORT/DATABASE?driver=ODBC+Driver+18+for+SQL+Server
For connections requiring encryption:
mssql+pyodbc://USER:PASSWORD@HOST:PORT/DATABASE?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes
Metadata
Release files for langgraph-checkpoint-mssql 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langgraph_checkpoint_mssql-0.1.0.tar.gz | 77.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langgraph_checkpoint_mssql-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.9 kB
Release files / langgraph_checkpoint_mssql-0.1.0.tar.gz
| Download URL | langgraph_checkpoint_mssql-0.1.0.tar.gz |
|---|---|
| Size | 77.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d6620adbdf35777a7c61874039dd5843f02b5c2d9b5640d8e4e862faa851b85
|
|
BLAKE2b-256 checksum How to use checksums |
7a6c29f6f5046786df8abee91207a5e7ce0408690db79ef17a3b20932fff5cb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / langgraph_checkpoint_mssql-0.1.0-py3-none-any.whl
| Download URL | langgraph_checkpoint_mssql-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18a9973a03ce989ad9965f47a2c243530aacb4e80516bf7ad16b38a3af24b06d
|
|
BLAKE2b-256 checksum How to use checksums |
f6bbdfbdc80abeb1a63667f488b03bdf944c6e96ae49549e501c3f1e166cbb1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|