Home / File/ env.py — langchain Source File

env.py — langchain Source File

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

Entity Profile

Dependency Diagram

graph LR
  79ae977f_fe77_5819_514c_52dbf755b6ba["env.py"]
  bafc65fd_0da5_0339_ed9e_2a63d33bf8c1["platform"]
  79ae977f_fe77_5819_514c_52dbf755b6ba --> bafc65fd_0da5_0339_ed9e_2a63d33bf8c1
  c990f2d7_9509_7cea_ca95_51ad57dbe5c6["functools"]
  79ae977f_fe77_5819_514c_52dbf755b6ba --> c990f2d7_9509_7cea_ca95_51ad57dbe5c6
  e4f26dda_fcb2_e350_498b_0cb1ab2104d3["langchain_classic"]
  79ae977f_fe77_5819_514c_52dbf755b6ba --> e4f26dda_fcb2_e350_498b_0cb1ab2104d3
  style 79ae977f_fe77_5819_514c_52dbf755b6ba fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import platform
from functools import lru_cache


@lru_cache(maxsize=1)
def get_runtime_environment() -> dict:
    """Get information about the LangChain runtime environment."""
    # Lazy import to avoid circular imports
    from langchain_classic import __version__

    return {
        "library_version": __version__,
        "library": "langchain-classic",
        "platform": platform.platform(),
        "runtime": "python",
        "runtime_version": platform.python_version(),
    }

Subdomains

Dependencies

  • functools
  • langchain_classic
  • platform

Frequently Asked Questions

What does env.py do?
env.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 env.py?
env.py defines 1 function(s): get_runtime_environment.
What does env.py depend on?
env.py imports 3 module(s): functools, langchain_classic, platform.
Where is env.py in the architecture?
env.py is located at libs/langchain/langchain_classic/env.py (domain: CoreAbstractions, subdomain: RunnableInterface, directory: libs/langchain/langchain_classic).

Analyze Your Own Codebase

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

Try Supermodel Free