aboutsummaryrefslogtreecommitdiffstats
path: root/obfuscator/utils.py
diff options
context:
space:
mode:
authorAlex <git@ajschof.me>2025-02-18 23:08:06 +0000
committerGitHub <noreply@github.com>2025-02-18 23:08:06 +0000
commiteb0d30d0235dbadd1d5c385a0a49d4cd8aea021e (patch)
tree4970d8999b622998800a99e2922b8639049169d9 /obfuscator/utils.py
parent362805c9354dc653442f4e144022cc577ebeb43e (diff)
parent20572634aaab2b522128a88449b2a32b6c028fc4 (diff)
downloadgdpr-obfuscator-eb0d30d0235dbadd1d5c385a0a49d4cd8aea021e.tar.gz
gdpr-obfuscator-eb0d30d0235dbadd1d5c385a0a49d4cd8aea021e.zip
Merge pull request #6 from ajschofield/feat/read_s3
implement reading from s3 bucket
Diffstat (limited to 'obfuscator/utils.py')
-rw-r--r--obfuscator/utils.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/obfuscator/utils.py b/obfuscator/utils.py
new file mode 100644
index 0000000..2e4211f
--- /dev/null
+++ b/obfuscator/utils.py
@@ -0,0 +1,15 @@
+# Utility functions
+from obfuscator.logger import get_logger
+
+# Create the logger
+logger = get_logger("CLI")
+
+
+def get_s3_path(uri):
+ parts = uri.replace("s3://", "").split("/")
+ logger.debug(f"Parts: {parts}")
+ bucket = parts.pop(0)
+ logger.debug(f"Bucket: {bucket}")
+ key = "/".join(parts)
+ logger.debug(f"Key: {key}")
+ return bucket, key
git.ajschof.me — hosted by ajschofield — powered by cgit