MCPcopy Create free account
hub / github.com/psf/cachecontrol / parse_uri

Function parse_uri

cachecontrol/controller.py:39–47  ·  view source on GitHub ↗

Parses a URI using the regex given in Appendix B of RFC 3986. (scheme, authority, path, query, fragment) = parse_uri(uri)

(uri: str)

Source from the content-addressed store, hash-verified

37
38
39def parse_uri(uri: str) -> tuple[str, str, str, str, str]:
40 """Parses a URI using the regex given in Appendix B of RFC 3986.
41
42 (scheme, authority, path, query, fragment) = parse_uri(uri)
43 """
44 match = URI.match(uri)
45 assert match is not None
46 groups = match.groups()
47 return (groups[1], groups[3], groups[4], groups[6], groups[8])
48
49
50class CacheController:

Callers 1

_urlnormMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…