Home / File/ __init__.py — langchain Source File

__init__.py — langchain Source File

Architecture documentation for __init__.py, a python file in the langchain codebase. 1 imports, 0 dependents.

File python AgentOrchestration ActionLogic 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  44e5b377_bdc7_34fe_8773_eaea959c7f08["__init__.py"]
  8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"]
  44e5b377_bdc7_34fe_8773_eaea959c7f08 --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3
  style 44e5b377_bdc7_34fe_8773_eaea959c7f08 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from typing import Any


def __getattr__(name: str) -> Any:
    """Get attr name."""
    if name == "create_spark_dataframe_agent":
        msg = (
            "This agent has been moved to langchain_experimental. "
            "This agent relies on python REPL tool under the hood, so to use it "
            "safely please sandbox the python REPL. "
            "Read https://github.com/langchain-ai/langchain/blob/master/SECURITY.md "
            "and https://github.com/langchain-ai/langchain/discussions/11680"
            "To keep using this code as is, install langchain_experimental and "
            "update your import statement from:\n"
            f"`langchain_classic.agents.agent_toolkits.spark.{name}` to "
            f"`langchain_experimental.agents.agent_toolkits.{name}`."
        )
        raise ImportError(msg)
    msg = f"{name} does not exist"
    raise AttributeError(msg)

Subdomains

Functions

Dependencies

  • typing

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 AgentOrchestration domain, ActionLogic subdomain.
What functions are defined in __init__.py?
__init__.py defines 1 function(s): __getattr__.
What does __init__.py depend on?
__init__.py imports 1 module(s): typing.
Where is __init__.py in the architecture?
__init__.py is located at libs/langchain/langchain_classic/agents/agent_toolkits/spark/__init__.py (domain: AgentOrchestration, subdomain: ActionLogic, directory: libs/langchain/langchain_classic/agents/agent_toolkits/spark).

Analyze Your Own Codebase

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

Try Supermodel Free