mget() — langchain Function Reference
Architecture documentation for the mget() function in file_system.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2519266e_27f4_b661_fa43_c386b4c1ef32["mget()"] 26189a3b_3a87_0b57_a7a3_341b06895b61["LocalFileStore"] 2519266e_27f4_b661_fa43_c386b4c1ef32 -->|defined in| 26189a3b_3a87_0b57_a7a3_341b06895b61 60db82b3_b672_7a32_40bd_32b87d30a271["_get_full_path()"] 2519266e_27f4_b661_fa43_c386b4c1ef32 -->|calls| 60db82b3_b672_7a32_40bd_32b87d30a271 style 2519266e_27f4_b661_fa43_c386b4c1ef32 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/storage/file_system.py lines 104–125
def mget(self, keys: Sequence[str]) -> list[bytes | None]:
"""Get the values associated with the given keys.
Args:
keys: A sequence of keys.
Returns:
A sequence of optional values associated with the keys.
If a key is not found, the corresponding value will be `None`.
"""
values: list[bytes | None] = []
for key in keys:
full_path = self._get_full_path(key)
if full_path.exists():
value = full_path.read_bytes()
values.append(value)
if self.update_atime:
# update access time only; preserve modified time
os.utime(full_path, (time.time(), full_path.stat().st_mtime))
else:
values.append(None)
return values
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does mget() do?
mget() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/storage/file_system.py.
Where is mget() defined?
mget() is defined in libs/langchain/langchain_classic/storage/file_system.py at line 104.
What does mget() call?
mget() calls 1 function(s): _get_full_path.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free