Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logger.info(f"Downloading {obj.key}")
download_path = os.path.join(resource_dir, obj.key)
bucket.download_file(obj.key, download_path)
logging.info(f"Downloaded to {download_path}")
dest_dir = os.path.join(resource_dir, prefix)
logging.info(f"Downloaded to {dest_dir}")
return dest_dir
@property
def path(self) -> Optional[str]:
return self._path
if __name__ == "__main__":
r = Resource("/tmp/main")
print(r.path)