__init__.py — langchain Source File
Architecture documentation for __init__.py, a python file in the langchain codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 46a259c1_be75_41da_26c5_0774b875149f["__init__.py"] feec1ec4_6917_867b_d228_b134d0ff8099["typing"] 46a259c1_be75_41da_26c5_0774b875149f --> feec1ec4_6917_867b_d228_b134d0ff8099 aceeabcc_ceb9_769c_111a_10f5caa3b983["langchain_core._import_utils"] 46a259c1_be75_41da_26c5_0774b875149f --> aceeabcc_ceb9_769c_111a_10f5caa3b983 f779daab_d86d_938c_2fd8_6b8029bad824["langchain_core.indexing.api"] 46a259c1_be75_41da_26c5_0774b875149f --> f779daab_d86d_938c_2fd8_6b8029bad824 fe95961d_dbfd_6448_7dd6_852edf919d56["langchain_core.indexing.base"] 46a259c1_be75_41da_26c5_0774b875149f --> fe95961d_dbfd_6448_7dd6_852edf919d56 style 46a259c1_be75_41da_26c5_0774b875149f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Code to help indexing data into a vectorstore.
This package contains helper logic to help deal with indexing data into
a `VectorStore` while avoiding duplicated content and over-writing content
if it's unchanged.
"""
from typing import TYPE_CHECKING
from langchain_core._import_utils import import_attr
if TYPE_CHECKING:
from langchain_core.indexing.api import IndexingResult, aindex, index
from langchain_core.indexing.base import (
DeleteResponse,
DocumentIndex,
InMemoryRecordManager,
RecordManager,
UpsertResponse,
)
__all__ = (
"DeleteResponse",
"DocumentIndex",
"InMemoryRecordManager",
"IndexingResult",
"RecordManager",
"UpsertResponse",
"aindex",
"index",
)
_dynamic_imports = {
"aindex": "api",
"index": "api",
"IndexingResult": "api",
"DeleteResponse": "base",
"DocumentIndex": "base",
"InMemoryRecordManager": "base",
"RecordManager": "base",
"UpsertResponse": "base",
}
def __getattr__(attr_name: str) -> object:
module_name = _dynamic_imports.get(attr_name)
result = import_attr(attr_name, module_name, __spec__.parent)
globals()[attr_name] = result
return result
def __dir__() -> list[str]:
return list(__all__)
Domain
Subdomains
Functions
Dependencies
- langchain_core._import_utils
- langchain_core.indexing.api
- langchain_core.indexing.base
- 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 DataProcessing domain, DocumentLoaders subdomain.
What functions are defined in __init__.py?
__init__.py defines 3 function(s): __dir__, __getattr__, langchain_core.
What does __init__.py depend on?
__init__.py imports 4 module(s): langchain_core._import_utils, langchain_core.indexing.api, langchain_core.indexing.base, typing.
Where is __init__.py in the architecture?
__init__.py is located at libs/core/langchain_core/indexing/__init__.py (domain: DataProcessing, subdomain: DocumentLoaders, directory: libs/core/langchain_core/indexing).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free