Home / File/ python.py — langchain Source File

python.py — langchain Source File

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

Entity Profile

Dependency Diagram

graph LR
  3976f2eb_50f0_66de_1143_e61f820ef5ed["python.py"]
  8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"]
  3976f2eb_50f0_66de_1143_e61f820ef5ed --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3
  885a8262_5dd0_fc53_460c_b7a8de727b5e["langchain_text_splitters.base"]
  3976f2eb_50f0_66de_1143_e61f820ef5ed --> 885a8262_5dd0_fc53_460c_b7a8de727b5e
  26e26c06_c107_2778_a237_35607f5a6d20["langchain_text_splitters.character"]
  3976f2eb_50f0_66de_1143_e61f820ef5ed --> 26e26c06_c107_2778_a237_35607f5a6d20
  style 3976f2eb_50f0_66de_1143_e61f820ef5ed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"""Python code text splitter."""

from __future__ import annotations

from typing import Any

from langchain_text_splitters.base import Language
from langchain_text_splitters.character import RecursiveCharacterTextSplitter


class PythonCodeTextSplitter(RecursiveCharacterTextSplitter):
    """Attempts to split the text along Python syntax."""

    def __init__(self, **kwargs: Any) -> None:
        """Initialize a `PythonCodeTextSplitter`."""
        separators = self.get_separators_for_language(Language.PYTHON)
        super().__init__(separators=separators, **kwargs)

Subdomains

Dependencies

  • langchain_text_splitters.base
  • langchain_text_splitters.character
  • typing

Frequently Asked Questions

What does python.py do?
python.py is a source file in the langchain codebase, written in python. It belongs to the DocumentProcessing domain, TextSplitters subdomain.
What does python.py depend on?
python.py imports 3 module(s): langchain_text_splitters.base, langchain_text_splitters.character, typing.
Where is python.py in the architecture?
python.py is located at libs/text-splitters/langchain_text_splitters/python.py (domain: DocumentProcessing, subdomain: TextSplitters, directory: libs/text-splitters/langchain_text_splitters).

Analyze Your Own Codebase

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

Try Supermodel Free