cursus.steps.utils¶
Step utilities module.
Home for shared, step-adjacent helpers that are NOT per-step artifacts (no
.step.yaml row, not discovered by the catalog). Introduced as part of the
FZ 31 folder simplification, which emptied the per-step data folders:
S3PathHandler(froms3_utils) — S3 path parsing/joining used by the synthesized step builders.
Import it from here (cursus.steps.utils); the former
cursus.steps.builders re-export was removed with that folder.
- 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.
- classmethod ensure_directory(uri, filename=None)[source]¶
Ensure URI represents a directory path (without filename).
- classmethod normalize(uri, description='S3 URI')[source]¶
Normalize an S3 URI by ensuring no trailing slashes or double slashes.
- 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
Modules