LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-sdk_asyncstoreStoreClientget_item
    Methodā—Since v0.3

    get_item

    Copy
    get_item(
      self,
      namespace: Sequence[str],
      ,
      key: str,
      *,
      
    View source on GitHub
    refresh_ttl
    :
    bool
    |
    None
    =
    None
    ,
    headers
    :
    Mapping
    [
    str
    ,
    str
    ]
    |
    None
    =
    None
    ,
    params
    :
    QueryParamTypes
    |
    None
    =
    None
    )
    ->
    Item

    Parameters

    NameTypeDescription
    key*str
    namespace*Sequence[str]
    refresh_ttlbool | None
    Default:None

    Retrieve a single item.

    The unique identifier for the item.

    Optional list of strings representing the namespace path.

    Whether to refresh the TTL on this read operation. If None, uses the store's default behavior.

    client = get_client(url="http://localhost:2024")
    item = await client.store.get_item(
        ["documents", "user123"],
        key="item456",
    )
    print(item)
    
    ----------------------------------------------------------------
    
    {
        'namespace': ['documents', 'user123'],
        'key': 'item456',
        'value': {'title': 'My Document', 'content': 'Hello World'},
        'created_at': '2024-07-30T12:00:00Z',
        'updated_at': '2024-07-30T12:00:00Z'
    }