diff options
| author | Alex Schofield <git@ajschof.me> | 2025-02-20 18:27:12 +0000 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2025-02-20 18:27:12 +0000 |
| commit | 70a16769761450b9c2aa63cda86a30a73bc0217c (patch) | |
| tree | b9b86ac8575e12f30bc0e53233c94b4ab99973b6 /gdpr_obfuscator/utils.py | |
| parent | 9827fcf1a40b0c4993da3f420177f4e390e038e9 (diff) | |
| download | gdpr-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.py | 16 |
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 |
