sandboxes.py — langchain Source File
Architecture documentation for sandboxes.py, a python file in the langchain codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c8292138_c3d5_2c31_8800_94b36cfcc2c9["sandboxes.py"] cccbe73e_4644_7211_4d55_e8fb133a8014["abc"] c8292138_c3d5_2c31_8800_94b36cfcc2c9 --> cccbe73e_4644_7211_4d55_e8fb133a8014 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"] c8292138_c3d5_2c31_8800_94b36cfcc2c9 --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3 120e2591_3e15_b895_72b6_cb26195e40a6["pytest"] c8292138_c3d5_2c31_8800_94b36cfcc2c9 --> 120e2591_3e15_b895_72b6_cb26195e40a6 3c1ccca0_be8b_b8e3_59f4_55c56142ce3c["deepagents.backends.protocol"] c8292138_c3d5_2c31_8800_94b36cfcc2c9 --> 3c1ccca0_be8b_b8e3_59f4_55c56142ce3c 86e12e47_abd3_7376_ceed_f0108db0965a["langchain_tests.base"] c8292138_c3d5_2c31_8800_94b36cfcc2c9 --> 86e12e47_abd3_7376_ceed_f0108db0965a cfe2bde5_180e_e3b0_df2b_55b3ebaca8e7["collections.abc"] c8292138_c3d5_2c31_8800_94b36cfcc2c9 --> cfe2bde5_180e_e3b0_df2b_55b3ebaca8e7 style c8292138_c3d5_2c31_8800_94b36cfcc2c9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Integration tests for the deepagents sandbox backend abstraction.
Implementers should subclass this test suite and provide a fixture that returns a
clean `SandboxBackendProtocol` instance.
Example:
```python
from __future__ import annotations
from collections.abc import Iterator
import pytest
from deepagents.backends.protocol import SandboxBackendProtocol
from langchain_tests.integration_tests import SandboxIntegrationTests
from my_pkg import make_sandbox
class TestMySandboxStandard(SandboxIntegrationTests):
@pytest.fixture(scope="class")
def sandbox(self) -> Iterator[SandboxBackendProtocol]:
backend = make_sandbox()
try:
yield backend
finally:
backend.delete()
```
"""
# ruff: noqa: E402, S108
from __future__ import annotations
from abc import abstractmethod
from typing import TYPE_CHECKING
import pytest
deepagents = pytest.importorskip("deepagents")
from deepagents.backends.protocol import (
FileDownloadResponse,
FileUploadResponse,
SandboxBackendProtocol,
)
from langchain_tests.base import BaseStandardTests
if TYPE_CHECKING:
from collections.abc import Iterator
class SandboxIntegrationTests(BaseStandardTests):
"""Standard integration tests for a `SandboxBackendProtocol` implementation."""
@pytest.fixture(scope="class")
def sandbox_backend(
self, sandbox: SandboxBackendProtocol
) -> SandboxBackendProtocol:
// ... (344 more lines)
Domain
Subdomains
Functions
Classes
Dependencies
- abc
- collections.abc
- deepagents.backends.protocol
- langchain_tests.base
- pytest
- typing
Source
Frequently Asked Questions
What does sandboxes.py do?
sandboxes.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, Serialization subdomain.
What functions are defined in sandboxes.py?
sandboxes.py defines 1 function(s): collections.
What does sandboxes.py depend on?
sandboxes.py imports 6 module(s): abc, collections.abc, deepagents.backends.protocol, langchain_tests.base, pytest, typing.
Where is sandboxes.py in the architecture?
sandboxes.py is located at libs/standard-tests/langchain_tests/integration_tests/sandboxes.py (domain: CoreAbstractions, subdomain: Serialization, directory: libs/standard-tests/langchain_tests/integration_tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free