Utils#

There are more relevant utilitary functions, but only the most important ones are listed below:

UPath#

class kedro_partitioned.utils.string.UPath(path: str, *args: Any, **kwargs: Any)[source]#

An universal Path that doesn’t return WindowsPaths.

if a Windows was returned by UPath, it converts to a PurePosixPath because Kedro always use PosixPath by default.

Parameters:

*args (str) – Paths to be parsed and joined (if multiple).

Example

>>> UPath('C:/Users/user/Desktop/file.txt')
PurePosixPath('C:/Users/user/Desktop/file.txt')
>>> UPath('http://azure.com/file.txt')
HTTPPath('http://azure.com/file.txt')
>>> UPath('a/b/c', 'd')
PurePosixPath('a/b/c/d')
>>> UPath('s3://test_bucket/file.txt')
S3Path('s3://test_bucket/file.txt')