list_keys() — langchain Function Reference
Architecture documentation for the list_keys() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2bb2e7d4_0042_208e_7024_858f44a6938a["list_keys()"] 84fe5b79_2fbc_b61f_ca25_e76f82c76cf4["InMemoryRecordManager"] 2bb2e7d4_0042_208e_7024_858f44a6938a -->|defined in| 84fe5b79_2fbc_b61f_ca25_e76f82c76cf4 91d8ded6_f5c8_b2ea_cc50_17bfe6d28a25["list_keys()"] 91d8ded6_f5c8_b2ea_cc50_17bfe6d28a25 -->|calls| 2bb2e7d4_0042_208e_7024_858f44a6938a 3c598158_81ec_b784_afbd_94cdae83804d["alist_keys()"] 3c598158_81ec_b784_afbd_94cdae83804d -->|calls| 2bb2e7d4_0042_208e_7024_858f44a6938a 91d8ded6_f5c8_b2ea_cc50_17bfe6d28a25["list_keys()"] 2bb2e7d4_0042_208e_7024_858f44a6938a -->|calls| 91d8ded6_f5c8_b2ea_cc50_17bfe6d28a25 style 2bb2e7d4_0042_208e_7024_858f44a6938a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/indexing/base.py lines 352–386
def list_keys(
self,
*,
before: float | None = None,
after: float | None = None,
group_ids: Sequence[str] | None = None,
limit: int | None = None,
) -> list[str]:
"""List records in the database based on the provided filters.
Args:
before: Filter to list records updated before this time.
after: Filter to list records updated after this time.
group_ids: Filter to list records with specific group IDs.
limit: optional limit on the number of records to return.
Returns:
A list of keys for the matching records.
"""
result = []
for key, data in self.records.items():
if before and data["updated_at"] >= before:
continue
if after and data["updated_at"] <= after:
continue
if group_ids and data["group_id"] not in group_ids:
continue
result.append(key)
if limit:
return result[:limit]
return result
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does list_keys() do?
list_keys() is a function in the langchain codebase, defined in libs/core/langchain_core/indexing/base.py.
Where is list_keys() defined?
list_keys() is defined in libs/core/langchain_core/indexing/base.py at line 352.
What does list_keys() call?
list_keys() calls 1 function(s): list_keys.
What calls list_keys()?
list_keys() is called by 2 function(s): alist_keys, list_keys.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free