Skip to main content

Azure CosmosDB checkpoint saver implementation for LangGraph

Project description

LangGraph Checkpoint CosmosDB

This project provides an implementation of a checkpoint saver for LangGraph using Azure CosmosDB.

Features

  • Save and retrieve langgraph checkpoints in Azure CosmosDB.

Installation

To install the package, ensure you have Python 3.9 or higher, and run:

pip install langgraph-checkpoint-cosmosdb

Usage

Setting Up CosmosDBSaver

To use the CosmosDBSaver, you need to provide the CosmosDB endpoint and key, along with the database and container names. These can be set as environment variables:

export COSMOSDB_ENDPOINT='your_cosmosdb_endpoint'
export COSMOSDB_KEY='your_cosmosdb_key'

Example

python
from langgraph_checkpoint_cosmosdb import CosmosDBSaver

Initialize the saver

Database and Container is created if it does not exists

saver = CosmosDBSaver(database_name='your_database', container_name='your_container')

Limitations

List function does not support filters. You can only pass config on thread id to get the list.

print(list(memory.list(config=config)))

License

This project is licensed under the MIT License.

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_cosmosdb-0.1.8.tar.gz (5.8 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_cosmosdb-0.1.8-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_checkpoint_cosmosdb-0.1.8.tar.gz.

File metadata

File hashes

Hashes for langgraph_checkpoint_cosmosdb-0.1.8.tar.gz
Algorithm Hash digest
SHA256 bd193cc7c09d89cebc3c03fb50f999cbddf8dffc171686c5600cc17c93c13790
MD5 c9240184754b3d08308ebe2397e8fe9b
BLAKE2b-256 1f053440f626d4ea85b083e7f3aa300acfea02a8160dd8d88ce1c078324bf7b0

See more details on using hashes here.

File details

Details for the file langgraph_checkpoint_cosmosdb-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for langgraph_checkpoint_cosmosdb-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cf3168af25a63b8ecad50a0539c8b1169d8736aa7ef07e9be79eb78b78ec894f
MD5 aa27f87f06d5addc83aafdd6a21953d6
BLAKE2b-256 4e0ba150a24f2bfed8cb12a4d67071e1ce4efb48b503918834b37ffff3465f29

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