Files
typeshed/stdlib/2.7/urlparse.pyi
2015-11-09 13:55:02 -08:00

48 lines
1.7 KiB
Python

# Stubs for urlparse (Python 2)
from typing import Dict, List, NamedTuple, Tuple
uses_relative = [] # type: List[str]
uses_netloc = [] # type: List[str]
uses_params = [] # type: List[str]
non_hierarchical = [] # type: List[str]
uses_query = [] # type: List[str]
uses_fragment = [] # type: List[str]
scheme_chars = ... # type: str
MAX_CACHE_SIZE = 0
def clear_cache() -> None: ...
class ResultMixin(object):
@property
def username(self) -> str: ...
@property
def password(self) -> str: ...
@property
def hostname(self) -> str: ...
@property
def port(self) -> int: ...
class SplitResult(NamedTuple('SplitResult', [
('scheme', str), ('netloc', str), ('path', str), ('query', str), ('fragment', str)
]), ResultMixin):
def geturl(self) -> str: ...
class ParseResult(NamedTuple('ParseResult', [
('scheme', str), ('netloc', str), ('path', str), ('params', str), ('query', str),
('fragment', str)
]), ResultMixin):
def geturl(self) -> str: ...
def urlparse(url: str, scheme: str = ..., allow_fragments: bool = ...) -> ParseResult: ...
def urlsplit(url: str, scheme: str = ..., allow_fragments: bool = ...) -> SplitResult: ...
def urlunparse(data: Tuple[str, str, str, str, str, str]) -> str: ...
def urlunsplit(data: Tuple[str, str, str, str, str]) -> str: ...
def urljoin(base: str, url: str, allow_fragments: bool = ...) -> str: ...
def urldefrag(url: str) -> str: ...
def unquote(s: str) -> str: ...
def parse_qs(qs: str, keep_blank_values: bool = ...,
strict_parsing: bool = ...) -> Dict[str, List[str]]: ...
def parse_qsl(qs: str, keep_blank_values: int = ...,
strict_parsing: bool = ...) -> List[Tuple[str, str]]: ...