detect_url_scheme
Function
This function is defined in the parse_utils module.Detect URL scheme from a string. O(1) operation.
Signature
Parameters
String to check for URL scheme
Returns
Scheme name (lowercase) if URL detected, None otherwise
Detect URL scheme from a string. O(1) operation.
This function is defined in the parse_utils module.Detect URL scheme from a string. O(1) operation.
def detect_url_scheme(value: str) -> Optional[str]
>>> detect_url_scheme("postgresql://localhost/db")
'postgresql'
>>> detect_url_scheme("redis://localhost:6379")
'redis'
>>> detect_url_scheme("not a url")
None