diff options
| author | Alex Schofield <git@ajschof.me> | 2025-02-18 19:53:46 +0000 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2025-02-18 19:53:46 +0000 |
| commit | 878d6e0dfd0ce1bfe00ca0bcadce6dd16749e6d3 (patch) | |
| tree | bbcc01a2dcb0eb61e921b342a32b2137df86d27d | |
| parent | 81f7d60e1a20f2d504d810fb44b01c79bd6d55a0 (diff) | |
| download | gdpr-obfuscator-878d6e0dfd0ce1bfe00ca0bcadce6dd16749e6d3.tar.gz gdpr-obfuscator-878d6e0dfd0ce1bfe00ca0bcadce6dd16749e6d3.zip | |
create utility function to parse S3 URI
| -rw-r--r-- | obfuscator/utils.py | 8 |
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 |
