Skip to content

Commit 2178db1

Browse files
authored
INTPYTHON-725 - Remove deprecated AsyncMongoDBSaver from langgraph-checkpoint-mongodb (#268)
[INTPYTHON-725](https://jira.mongodb.org/browse/INTPYTHON-725).
1 parent 8276dd2 commit 2178db1

File tree

6 files changed

+52
-669
lines changed

6 files changed

+52
-669
lines changed

libs/langgraph-checkpoint-mongodb/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,15 @@ with MongoDBSaver.from_conn_string(MONGODB_URI, DB_NAME) as checkpointer:
5353
### Async
5454

5555
```python
56-
from langgraph.checkpoint.pymongo import AsyncMongoDBSaver
56+
from langgraph.checkpoint.mongodb import MongoDBSaver
57+
58+
write_config = {"configurable": {"thread_id": "1", "checkpoint_ns": ""}}
59+
read_config = {"configurable": {"thread_id": "1"}}
5760

58-
async with AsyncMongoDBSaver.from_conn_string(MONGODB_URI) as checkpointer:
61+
MONGODB_URI = "mongodb://localhost:27017"
62+
DB_NAME = "checkpoint_example"
63+
64+
with MongoDBSaver.from_conn_string(MONGODB_URI, DB_NAME) as checkpointer:
5965
checkpoint = {
6066
"v": 1,
6167
"ts": "2024-07-31T20:14:19.804150+00:00",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from .aio import AsyncMongoDBSaver
21
from .saver import MongoDBSaver
32

4-
__all__ = ["MongoDBSaver", "AsyncMongoDBSaver"]
3+
__all__ = ["MongoDBSaver"]

0 commit comments

Comments
 (0)