From 878d6e0dfd0ce1bfe00ca0bcadce6dd16749e6d3 Mon Sep 17 00:00:00 2001 From: Alex Schofield Date: Tue, 18 Feb 2025 19:53:46 +0000 Subject: create utility function to parse S3 URI --- obfuscator/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 obfuscator/utils.py (limited to 'obfuscator/utils.py') diff --git a/obfuscator/utils.py b/obfuscator/utils.py new file mode 100644 index 0000000..f0174f8 --- /dev/null +++ b/obfuscator/utils.py @@ -0,0 +1,8 @@ +# Utility functions + + +def get_s3_path(uri): + parts = uri.replace("s3://", "").split("/") + bucket = parts.pop(0) + key = "/".join(parts) + return bucket, key -- cgit v1.2.3