Skip to content

Commit 1f9f649

Browse files
ysunioSunil Yadavmichaelnchin
authored
chore: expose DynamoDBSaver from root path (#746)
Simplified the import path for `DynamoDBSaver` by exposing it at the package root level, improving developer experience and consistency with other checkpoint savers. --------- Co-authored-by: Sunil Yadav <[email protected]> Co-authored-by: Michael Chin <[email protected]>
1 parent 155c1a3 commit 1f9f649

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

libs/langgraph-checkpoint-aws/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ with ValkeyCache.from_conn_string(
190190

191191
```python
192192
from langgraph.graph import StateGraph
193-
from langgraph_checkpoint_aws.checkpoint.dynamodb import DynamoDBSaver
193+
from langgraph_checkpoint_aws import DynamoDBSaver
194194

195195
# Basic usage with DynamoDB only
196196
checkpointer = DynamoDBSaver(
@@ -376,7 +376,7 @@ All components support async operations:
376376
```python
377377
from langgraph_checkpoint_aws.async_saver import AsyncBedrockSessionSaver
378378
from langgraph_checkpoint_aws import AsyncValkeySaver
379-
from langgraph_checkpoint_aws.checkpoint.dynamodb import DynamoDBSaver
379+
from langgraph_checkpoint_aws import DynamoDBSaver
380380

381381
# Async Bedrock usage
382382
session_saver = AsyncBedrockSessionSaver(region_name="us-west-2")

libs/langgraph-checkpoint-aws/docs/dynamodb/DynamoDBSaver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pip install langgraph-checkpoint-aws
4343
## Quick Start
4444

4545
```python
46-
from langgraph_checkpoint_aws.checkpoint.dynamodb import DynamoDBSaver
46+
from langgraph_checkpoint_aws import DynamoDBSaver
4747
from langgraph.graph import StateGraph
4848

4949
# Initialize checkpointer

libs/langgraph-checkpoint-aws/langgraph_checkpoint_aws/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
from langgraph_checkpoint_aws.agentcore.store import (
1313
AgentCoreMemoryStore,
1414
)
15+
from langgraph_checkpoint_aws.checkpoint.dynamodb import (
16+
DynamoDBSaver,
17+
)
1518

1619
# Conditional imports for Valkey functionality
1720
try:
@@ -98,6 +101,7 @@ def _missing_dependencies_error(*args: Any, **kwargs: Any) -> Any:
98101
"ValkeyValidationError",
99102
"ValkeySaver",
100103
"ValkeyCache",
104+
"DynamoDBSaver",
101105
"SDK_USER_AGENT",
102106
"valkey_available",
103107
]

libs/langgraph-checkpoint-aws/tests/integration_tests/checkpoint/dynamodb/test_langgraph_dynamodb_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from langgraph.graph.message import add_messages
2020
from langgraph.types import Command
2121

22-
from langgraph_checkpoint_aws.checkpoint.dynamodb import DynamoDBSaver
22+
from langgraph_checkpoint_aws import DynamoDBSaver
2323

2424
logger = logging.getLogger(__name__)
2525

libs/langgraph-checkpoint-aws/tests/unit_tests/checkpoint/dynamodb/test_saver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
TEST_TTL_SECONDS,
1616
)
1717

18-
from langgraph_checkpoint_aws.checkpoint.dynamodb.saver import DynamoDBSaver
18+
from langgraph_checkpoint_aws import DynamoDBSaver
1919

2020

2121
class TestDynamoDBSaverInitialization:

samples/memory/dynamodb_saver.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"from langgraph.graph.message import add_messages\n",
7171
"\n",
7272
"# Import DynamoDB saver\n",
73-
"from langgraph_checkpoint_aws.checkpoint.dynamodb import DynamoDBSaver\n",
73+
"from langgraph_checkpoint_aws import DynamoDBSaver\n",
7474
"import boto3\n",
7575
"\n",
7676
"print(\"✅ All dependencies imported successfully!\")\n",
@@ -273,7 +273,7 @@
273273
" temperature=0.7,\n",
274274
" max_tokens=2048,\n",
275275
" region_name=REGION_NAME,\n",
276-
" client=session.client('bedrock-runtime')\n",
276+
" client=boto_session.client('bedrock-runtime')\n",
277277
")\n",
278278
"\n",
279279
"print(\"✅ Language model initialized (Claude 4 Sonnet)\")\n",

0 commit comments

Comments
 (0)