__init__.py — langchain Source File
Architecture documentation for __init__.py, a python file in the langchain codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 186ba5c0_d613_b319_0936_7821b4c5628d["__init__.py"] 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"] 186ba5c0_d613_b319_0936_7821b4c5628d --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3 cf23aed0_f3dd_3cba_61aa_c00a3e5a1b92["langchain_core.stores"] 186ba5c0_d613_b319_0936_7821b4c5628d --> cf23aed0_f3dd_3cba_61aa_c00a3e5a1b92 439a4142_6fa6_fe9a_2cba_7c9fb0cdceb7["langchain_classic._api"] 186ba5c0_d613_b319_0936_7821b4c5628d --> 439a4142_6fa6_fe9a_2cba_7c9fb0cdceb7 aa26d4cf_7506_d0bd_5c39_6056e46f2c85["langchain_classic.storage._lc_store"] 186ba5c0_d613_b319_0936_7821b4c5628d --> aa26d4cf_7506_d0bd_5c39_6056e46f2c85 11a9f766_2db8_7f17_8105_8f15ab8ad708["langchain_classic.storage.encoder_backed"] 186ba5c0_d613_b319_0936_7821b4c5628d --> 11a9f766_2db8_7f17_8105_8f15ab8ad708 558dc521_5525_3944_3516_758d65922590["langchain_classic.storage.file_system"] 186ba5c0_d613_b319_0936_7821b4c5628d --> 558dc521_5525_3944_3516_758d65922590 ec5a636c_a796_0bdc_880f_74560f65472e["langchain_community.storage"] 186ba5c0_d613_b319_0936_7821b4c5628d --> ec5a636c_a796_0bdc_880f_74560f65472e style 186ba5c0_d613_b319_0936_7821b4c5628d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Implementations of key-value stores and storage helpers.
Module provides implementations of various key-value stores that conform
to a simple key-value interface.
The primary goal of these storages is to support implementation of caching.
"""
from typing import TYPE_CHECKING, Any
from langchain_core.stores import (
InMemoryByteStore,
InMemoryStore,
InvalidKeyException,
)
from langchain_classic._api import create_importer
from langchain_classic.storage._lc_store import create_kv_docstore, create_lc_store
from langchain_classic.storage.encoder_backed import EncoderBackedStore
from langchain_classic.storage.file_system import LocalFileStore
if TYPE_CHECKING:
from langchain_community.storage import (
RedisStore,
UpstashRedisByteStore,
UpstashRedisStore,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"RedisStore": "langchain_community.storage",
"UpstashRedisByteStore": "langchain_community.storage",
"UpstashRedisStore": "langchain_community.storage",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"EncoderBackedStore",
"InMemoryByteStore",
"InMemoryStore",
"InvalidKeyException",
"LocalFileStore",
"RedisStore",
"UpstashRedisByteStore",
"UpstashRedisStore",
"create_kv_docstore",
"create_lc_store",
]
Domain
Subdomains
Functions
Dependencies
- langchain_classic._api
- langchain_classic.storage._lc_store
- langchain_classic.storage.encoder_backed
- langchain_classic.storage.file_system
- langchain_community.storage
- langchain_core.stores
- typing
Source
Frequently Asked Questions
What does __init__.py do?
__init__.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, RunnableInterface subdomain.
What functions are defined in __init__.py?
__init__.py defines 2 function(s): __getattr__, langchain_community.
What does __init__.py depend on?
__init__.py imports 7 module(s): langchain_classic._api, langchain_classic.storage._lc_store, langchain_classic.storage.encoder_backed, langchain_classic.storage.file_system, langchain_community.storage, langchain_core.stores, typing.
Where is __init__.py in the architecture?
__init__.py is located at libs/langchain/langchain_classic/storage/__init__.py (domain: CoreAbstractions, subdomain: RunnableInterface, directory: libs/langchain/langchain_classic/storage).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free