aboutsummaryrefslogtreecommitdiffstats
path: root/obfuscator/utils.py
blob: 2e4211fe1c87860f84bf36031b043875c2ce8dde (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("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