aboutsummaryrefslogtreecommitdiffstats
path: root/obfuscator/utils.py
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2025-02-18 19:53:46 +0000
committerAlex Schofield <git@ajschof.me>2025-02-18 19:53:46 +0000
commit878d6e0dfd0ce1bfe00ca0bcadce6dd16749e6d3 (patch)
treebbcc01a2dcb0eb61e921b342a32b2137df86d27d /obfuscator/utils.py
parent81f7d60e1a20f2d504d810fb44b01c79bd6d55a0 (diff)
downloadgdpr-obfuscator-878d6e0dfd0ce1bfe00ca0bcadce6dd16749e6d3.tar.gz
gdpr-obfuscator-878d6e0dfd0ce1bfe00ca0bcadce6dd16749e6d3.zip
create utility function to parse S3 URI
Diffstat (limited to 'obfuscator/utils.py')
-rw-r--r--obfuscator/utils.py8
1 files changed, 8 insertions, 0 deletions
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
git.ajschof.me — hosted by ajschofield — powered by cgit