t_s3_path.py 485 B

123456789
  1. from pathlib import Path,PurePosixPath,PureWindowsPath,PurePath
  2. from utils.file import read_file,save_to_file,s3,resource,get_s3_uri_info
  3. from utils.logu import get_logger
  4. from upath import UPath
  5. logger = get_logger('test')
  6. mhtml_path = 's3://public/amazone/copywriting_production/output/B0B658JC22/B0B658JC22.mhtml'
  7. bucket_name, object_name, upload_args = get_s3_uri_info(mhtml_path)
  8. # data = read_file(mhtml_path)
  9. logger.info(f"{s3.head_object(Bucket=bucket_name, Key=object_name)}")