Skip to main content

LangGraph Checkpoint DuckDB

Implementation of LangGraph CheckpointSaver that uses DuckDB.

Usage

from langgraph.checkpoint.duckdb import DuckDBSaver

write_config = {"configurable": {"thread_id": "1", "checkpoint_ns": ""}}
read_config = {"configurable": {"thread_id": "1"}}

with DuckDBSaver.from_conn_string(":memory:") as checkpointer:
    # call .setup() the first time you're using the checkpointer
    checkpointer.setup()
    checkpoint = {
        "v": 1,
        "ts": "2024-07-31T20:14:19.804150+00:00",
        "id": "1ef4f797-8335-6428-8001-8a1503f9b875",
        "channel_values": {
            "my_key": "meow",
            "node": "node"
        },
        "channel_versions": {
            "__start__": 2,
            "my_key": 3,
            "start:node": 3,
            "node": 3
        },
        "versions_seen": {
            "__input__": {},
            "__start__": {
            "__start__": 1
            },
            "node": {
            "start:node": 2
            }
        },
        "pending_sends": [],
    }

    # store checkpoint
    checkpointer.put(write_config, checkpoint, {}, {})

    # load checkpoint
    checkpointer.get(read_config)

    # list checkpoints
    list(checkpointer.list(read_config))

Async

from langgraph.checkpoint.duckdb.aio import AsyncDuckDBSaver

async with AsyncDuckDBSaver.from_conn_string(":memory:") as checkpointer:
    checkpoint = {
        "v": 1,
        "ts": "2024-07-31T20:14:19.804150+00:00",
        "id": "1ef4f797-8335-6428-8001-8a1503f9b875",
        "channel_values": {
            "my_key": "meow",
            "node": "node"
        },
        "channel_versions": {
            "__start__": 2,
            "my_key": 3,
            "start:node": 3,
            "node": 3
        },
        "versions_seen": {
            "__input__": {},
            "__start__": {
            "__start__": 1
            },
            "node": {
            "start:node": 2
            }
        },
        "pending_sends": [],
    }

    # 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)]

Metadata

Release files for langgraph-checkpoint-duckdb 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langgraph-checkpoint-duckdb 2.0.2
File Size Uploaded Provenance Actions
langgraph_checkpoint_duckdb-2.0.2.tar.gz 12.1 kB Without provenance Details for langgraph_checkpoint_duckdb-2.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langgraph-checkpoint-duckdb 2.0.2
File Interpreter ABI Platform Actions
langgraph_checkpoint_duckdb-2.0.2-py3-none-any.whl Python 3 none any Details for langgraph_checkpoint_duckdb-2.0.2-py3-none-any.whl

Total release size: 29.0 kB

Release files / langgraph_checkpoint_duckdb-2.0.2.tar.gz

Download URL langgraph_checkpoint_duckdb-2.0.2.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ed0be53a4b99bb933b13bbf494891b2cfcecb2e21bde4f9c1abf437de6c7c641
BLAKE2b-256 checksum
How to use checksums
f079ca077d922610c2abee44f6fd6ccb8453dfae16a965eac2e066a72431e195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / langgraph_checkpoint_duckdb-2.0.2-py3-none-any.whl

Download URL langgraph_checkpoint_duckdb-2.0.2-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
378d73e77a2a93db113a89ec2bb59e3448e7072ca729b4570c23cf5f2917da85
BLAKE2b-256 checksum
How to use checksums
4cf79a2814211a548bc268695289dd8ee06ac0cbeda5291c8444477ee864bb64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Security for langgraph-checkpoint-duckdb 2.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page