url_parser.pyi 565 B

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