aboutsummaryrefslogtreecommitdiffstats
path: root/obfuscator/utils.py
blob: 1d1c3fea300c215442075b43aac5418afec1d9f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Utility functions
from obfuscator.logger import get_logger

# Create the logger
logger = get_logger("UTILS")


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