Home / Class/ InMemoryByteStore Class — langchain Architecture

InMemoryByteStore Class — langchain Architecture

Architecture documentation for the InMemoryByteStore class in stores.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  0d3e084b_2feb_6056_42fd_0058dcf99043["InMemoryByteStore"]
  f0969880_8c80_c0b9_0855_568e385cf51f["stores.py"]
  0d3e084b_2feb_6056_42fd_0058dcf99043 -->|defined in| f0969880_8c80_c0b9_0855_568e385cf51f

Relationship Graph

Source Code

libs/core/langchain_core/stores.py lines 267–287

class InMemoryByteStore(InMemoryBaseStore[bytes]):
    """In-memory store for bytes.

    Attributes:
        store: The underlying dictionary that stores the key-value pairs.

    Examples:
        ```python
        from langchain.storage import InMemoryByteStore

        store = InMemoryByteStore()
        store.mset([("key1", b"value1"), ("key2", b"value2")])
        store.mget(["key1", "key2"])
        # [b'value1', b'value2']
        store.mdelete(["key1"])
        list(store.yield_keys())
        # ['key2']
        list(store.yield_keys(prefix="k"))
        # ['key2']
        ```
    """

Frequently Asked Questions

What is the InMemoryByteStore class?
InMemoryByteStore is a class in the langchain codebase, defined in libs/core/langchain_core/stores.py.
Where is InMemoryByteStore defined?
InMemoryByteStore is defined in libs/core/langchain_core/stores.py at line 267.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free