aboutsummaryrefslogtreecommitdiffstats
path: root/gdpr_obfuscator/utils.py
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2025-02-20 18:27:12 +0000
committerAlex Schofield <git@ajschof.me>2025-02-20 18:27:12 +0000
commit70a16769761450b9c2aa63cda86a30a73bc0217c (patch)
treeb9b86ac8575e12f30bc0e53233c94b4ab99973b6 /gdpr_obfuscator/utils.py
parent9827fcf1a40b0c4993da3f420177f4e390e038e9 (diff)
downloadgdpr-obfuscator-70a16769761450b9c2aa63cda86a30a73bc0217c.tar.gz
gdpr-obfuscator-70a16769761450b9c2aa63cda86a30a73bc0217c.zip
update pyproject.toml & references with new src folder name
Diffstat (limited to 'gdpr_obfuscator/utils.py')
-rw-r--r--gdpr_obfuscator/utils.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdpr_obfuscator/utils.py b/gdpr_obfuscator/utils.py
new file mode 100644
index 0000000..77ca1cf
--- /dev/null
+++ b/gdpr_obfuscator/utils.py
@@ -0,0 +1,16 @@
+# Utility functions
+from obfuscator.logger import get_logger
+
+
+class Utilities:
+ def __init__(self, logger=None):
+ self.logger = get_logger("UTILITIES", logger)
+
+ def get_s3_path(self, uri):
+ parts = uri.replace("s3://", "").split("/")
+ self.logger.debug(f"Parts: {parts}")
+ bucket = parts.pop(0)
+ self.logger.debug(f"Bucket: {bucket}")
+ key = "/".join(parts)
+ self.logger.debug(f"Key: {key}")
+ return bucket, key
git.ajschof.me — hosted by ajschofield — powered by cgit