Skip to main content

Library with a MSSQL implementation of LangGraph checkpoint saver.

Project description

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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgraph_checkpoint_mssql-0.1.0.tar.gz (77.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langgraph_checkpoint_mssql-0.1.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_checkpoint_mssql-0.1.0.tar.gz.

File metadata

  • Download URL: langgraph_checkpoint_mssql-0.1.0.tar.gz
  • Upload date:
  • Size: 77.2 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for langgraph_checkpoint_mssql-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d6620adbdf35777a7c61874039dd5843f02b5c2d9b5640d8e4e862faa851b85
MD5 5d6f817f28b278394f53eeec2a413617
BLAKE2b-256 7a6c29f6f5046786df8abee91207a5e7ce0408690db79ef17a3b20932fff5cb1

See more details on using hashes here.

File details

Details for the file langgraph_checkpoint_mssql-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: langgraph_checkpoint_mssql-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for langgraph_checkpoint_mssql-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18a9973a03ce989ad9965f47a2c243530aacb4e80516bf7ad16b38a3af24b06d
MD5 fe6ee9a1425f416679827cdaef82795e
BLAKE2b-256 f6bbdfbdc80abeb1a63667f488b03bdf944c6e96ae49549e501c3f1e166cbb1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page