MCPcopy Index your code
hub / github.com/pyathena-dev/PyAthena / parse_path

Method parse_path

pyathena/filesystem/s3.py:231–235  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

229
230 @staticmethod
231 def parse_path(path: str) -> tuple[str, str | None, str | None]:
232 match = S3FileSystem.PATTERN_PATH.search(path)
233 if match:
234 return match.group("bucket"), match.group("key"), match.group("version_id")
235 raise ValueError(f"Invalid S3 path format {path}.")
236
237 @staticmethod
238 def _directory_object(bucket: str, key: str | None, version_id: str | None = None) -> S3Object:

Callers 15

_head_objectMethod · 0.95
_ls_dirsMethod · 0.95
_ls_object_versionsMethod · 0.95
infoMethod · 0.95
_findMethod · 0.95
existsMethod · 0.95
rm_fileMethod · 0.95
rmMethod · 0.95
_delete_objectsMethod · 0.95
mkdirMethod · 0.95
rmdirMethod · 0.95
touchMethod · 0.95

Calls

no outgoing calls

Tested by 13

test_parse_pathMethod · 0.36
test_info_bucketMethod · 0.36
test_info_dirMethod · 0.36
test_info_fileMethod · 0.36
test_checksumMethod · 0.36
test_parse_pathMethod · 0.36
test_info_bucketMethod · 0.36
test_info_dirMethod · 0.36
test_info_fileMethod · 0.36