MCPcopy Index your code
hub / github.com/google/adk-python / load_yaml_file

Function load_yaml_file

src/google/adk/utils/yaml_utils.py:30–46  ·  view source on GitHub ↗

Loads a YAML file and returns its content. Args: file_path: Path to the YAML file. Returns: The content of the YAML file. Raises: FileNotFoundError: If the file_path does not exist.

(file_path: Union[str, Path])

Source from the content-addressed store, hash-verified

28
29
30def load_yaml_file(file_path: Union[str, Path]) -> Any:
31 """Loads a YAML file and returns its content.
32
33 Args:
34 file_path: Path to the YAML file.
35
36 Returns:
37 The content of the YAML file.
38
39 Raises:
40 FileNotFoundError: If the file_path does not exist.
41 """
42 file_path = Path(file_path)
43 if not file_path.is_file():
44 raise FileNotFoundError(f'YAML file not found: {file_path}')
45 with file_path.open('r', encoding='utf-8') as f:
46 return yaml.safe_load(f)
47
48
49def dump_pydantic_to_yaml(

Callers

nothing calls this directly

Calls 1

openMethod · 0.80

Tested by

no test coverage detected