DynamoDB checkpoint saver implementation for LangGraph
Project description
LangGraph DynamoDB Checkpoint Saver
A DynamoDB-based checkpoint saver implementation for LangGraph that allows storing and managing checkpoints in Amazon DynamoDB.
Installation
bash pip install langgraph_dynamodb_checkpoint
Usage
Basic Initialization
python from langgraph_dynamodb_checkpoint import DynamoDBSaver
Initialize the saver with a table name
saver = DynamoDBSaver( table_name="your-dynamodb-table-name", max_read_request_units=10, # Optional, default is 10 max_write_request_units=10 # Optional, default is 10 )
Alternative Initialization Using Context Manager
python from langgraph_dynamodb_checkpoint import DynamoDBSaver
with DynamoDBSaver.from_conn_info(table_name="your-dynamodb-table-name") as saver: # Use the saver here pass
Parameters
DynamoDBSaver Constructor
table_name(str): Name of the DynamoDB table to use for storing checkpointsmax_read_request_units(int, optional): Maximum read request units for the DynamoDB table. Defaults to 10max_write_request_units(int, optional): Maximum write request units for the DynamoDB table. Defaults to 10
Table Structure
The saver automatically creates a DynamoDB table if it doesn't exist, with the following structure:
- Partition Key (PK): String type, used for thread_id
- Sort Key (SK): String type, used for checkpoint_id
AWS Configuration
Ensure you have proper AWS credentials configured either through:
- Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
- AWS credentials file (~/.aws/credentials)
- IAM role when running on AWS services
The AWS credentials should have permissions to:
- Create DynamoDB tables (if table doesn't exist)
- Read and write to DynamoDB tables
Notes
- The saver automatically creates the DynamoDB table if it doesn't exist
- Uses on-demand billing mode for DynamoDB
- Implements all methods required by the LangGraph BaseCheckpointSaver interface
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langgraph_dynamodb_checkpoint-0.1.5.tar.gz.
File metadata
- Download URL: langgraph_dynamodb_checkpoint-0.1.5.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f16ac2c69b434aba76ca7593ee3a752b6bedd11b5efed93b771130e66a2a0c2d
|
|
| MD5 |
b883dd1e7981b649cecc9a39b88fc362
|
|
| BLAKE2b-256 |
6222734299b493d954d659c6c8bcebf63038db9e96686861ade128d1f9c68466
|
File details
Details for the file langgraph_dynamodb_checkpoint-0.1.5-py3-none-any.whl.
File metadata
- Download URL: langgraph_dynamodb_checkpoint-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9384b32a34ac80028b6cacdc44b39032333b9f54469fb23d963e39062c2f185
|
|
| MD5 |
06347c85c52ee8d804372ec13aac25c6
|
|
| BLAKE2b-256 |
adfdedfa76e70994acf8fc324f7a11fafb1d782b05561b0d8b303812f147e47f
|