Skip to content

Commit 02e8f3d

Browse files
authored
Create url_parser.pyi
1 parent d1d9d9e commit 02e8f3d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

httptools/parser/url_parser.pyi

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from typing import Union
2+
from array import array
3+
4+
class URL:
5+
schema:bytes
6+
host:bytes
7+
port:int
8+
path:bytes
9+
query:bytes
10+
fragment:bytes
11+
userinfo:bytes
12+
13+
def 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+
29+

0 commit comments

Comments
 (0)