codekingpro/portable-devtools
115k
1from typing import Union
2from array import array
3
4class URL:
5 schema: bytes
6 host: bytes
7 port: int
8 path: bytes
9 query: bytes
10 fragment: bytes
11 userinfo: bytes
12
13def parse_url(url: Union[bytes, bytearray, memoryview, array]) -> URL:
14 """Parse URL strings into a structured Python object.
15
16 Returns an instance of ``httptools.URL`` class with the
17 following attributes:
18
19 - schema: bytes
20 - host: bytes
21 - port: int
22 - path: bytes
23 - query: bytes
24 - fragment: bytes
25 - userinfo: bytes
26 """
27 ...
28 