MCPcopy Create free account
hub / github.com/streamlit/streamlit / _parse_file_path

Method _parse_file_path

lib/streamlit/runtime/secrets.py:367–377  ·  view source on GitHub ↗
(self, path: str)

Source from the content-addressed store, hash-verified

365 return secrets, found_secrets_file
366
367 def _parse_file_path(self, path: str) -> tuple[Mapping[str, Any], bool]:
368 if path.endswith(".toml"):
369 return self._parse_toml_file(path)
370
371 if os.path.isdir(path):
372 return self._parse_directory(path)
373
374 error_msg = secret_error_messages_singleton.get_invalid_secret_path_message(
375 path
376 )
377 raise StreamlitSecretNotFoundError(error_msg)
378
379 def _parse(self) -> Mapping[str, Any]:
380 """Parse our secrets.toml files if they're not already parsed.

Callers 2

_parseMethod · 0.95

Calls 5

_parse_toml_fileMethod · 0.95
_parse_directoryMethod · 0.95
isdirMethod · 0.80