cursus.steps.utils.s3_utils¶
- class S3PathHandler[source]¶
Bases:
objectUtility class for handling S3 URIs and paths.
Provides methods to properly manipulate S3 paths while avoiding common issues like double slashes or incorrect path handling that can occur when using standard os.path functions with S3 URIs.
- static parse_uri(uri)[source]¶
Parse an S3 URI into components.
- Parameters:
uri (str) – S3 URI to parse
- Returns:
(bucket, key)
- Return type:
- Raises:
ValueError – If not a valid S3 URI
- classmethod normalize(uri, description='S3 URI')[source]¶
Normalize an S3 URI by ensuring no trailing slashes or double slashes.