opentimelineio.url_utils

Utilities for conversion between URLs and file paths.

opentimelineio.url_utils.filepath_from_url(urlstr)

Take a URL and return a filepath.

Handles URLs encoded per RFC 3986, Windows drive letters (file://C:/...), UNC paths (file://host/share/...), and the file://localhost/... variant.

Returns the input unchanged if it cannot be converted.

opentimelineio.url_utils.url_from_filepath(fpath)

Convert a filesystem path to a URL in a portable way.

ensures that fpath conforms to the following pattern:
In other words, if you pass in: