class documentation

URL query parameters, as a multi-dict.

Method __bool__ Undocumented
Method __contains__ Undocumented
Method __eq__ Undocumented
Method __getitem__ Undocumented
Method __hash__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method __setitem__ Undocumented
Method __str__ Undocumented
Method add Return a new QueryParams instance, setting or appending the value of a key.
Method get Get a value from the query param for a given key. If the key occurs more than once, then only the first value is returned.
Method get_list Get all values from the query param for a given key.
Method items Return all items in the query params. If a key occurs more than once only the first item for that key is returned.
Method keys Return all the keys in the query params.
Method merge Return a new QueryParams instance, updated with.
Method multi_items Return all items in the query params. Allow duplicate keys to occur.
Method remove Return a new QueryParams instance, removing the value of a key.
Method set Return a new QueryParams instance, setting the value of a key.
Method update Undocumented
Method values Return all the values in the query params. If a key occurs more than once only the first item for that key is returned.
Instance Variable _dict Undocumented
def __bool__(self): (source)

Undocumented

Returns
boolUndocumented
def __contains__(self, key): (source)

Undocumented

Parameters
key:typing.AnyUndocumented
Returns
boolUndocumented
def __eq__(self, other): (source)

Undocumented

Parameters
other:typing.AnyUndocumented
Returns
boolUndocumented
def __getitem__(self, key): (source)

Undocumented

Parameters
key:typing.AnyUndocumented
Returns
strUndocumented
def __hash__(self): (source)

Undocumented

Returns
intUndocumented
def __init__(self, *args, **kwargs): (source)

Undocumented

Parameters
*args:typing.Optional[QueryParamTypes]Undocumented
**kwargs:typing.AnyUndocumented
def __iter__(self): (source)

Undocumented

Returns
typing.Iterator[typing.Any]Undocumented
def __len__(self): (source)

Undocumented

Returns
intUndocumented
def __repr__(self): (source)

Undocumented

Returns
strUndocumented
def __setitem__(self, key, value): (source)

Undocumented

Parameters
key:strUndocumented
value:strUndocumented
def __str__(self): (source)

Undocumented

Returns
strUndocumented
def add(self, key, value=None): (source)

Return a new QueryParams instance, setting or appending the value of a key. Usage: q = httpx.QueryParams("a=123") q = q.add("a", "456") assert q == httpx.QueryParams("a=123&a=456")

Parameters
key:strUndocumented
value:typing.AnyUndocumented
Returns
QueryParamsUndocumented
def get(self, key, default=None): (source)

Get a value from the query param for a given key. If the key occurs more than once, then only the first value is returned. Usage: q = httpx.QueryParams("a=123&a=456&b=789") assert q.get("a") == "123"

Parameters
key:typing.AnyUndocumented
default:typing.AnyUndocumented
Returns
typing.AnyUndocumented
def get_list(self, key): (source)

Get all values from the query param for a given key. Usage: q = httpx.QueryParams("a=123&a=456&b=789") assert q.get_list("a") == ["123", "456"]

Parameters
key:strUndocumented
Returns
typing.List[str]Undocumented
def items(self): (source)

Return all items in the query params. If a key occurs more than once only the first item for that key is returned. Usage: q = httpx.QueryParams("a=123&a=456&b=789") assert list(q.items()) == [("a", "123"), ("b", "789")]

Returns
typing.ItemsView[str, str]Undocumented
def keys(self): (source)

Return all the keys in the query params. Usage: q = httpx.QueryParams("a=123&a=456&b=789") assert list(q.keys()) == ["a", "b"]

Returns
typing.KeysView[str]Undocumented
def merge(self, params=None): (source)

Return a new QueryParams instance, updated with. Usage: q = httpx.QueryParams("a=123") q = q.merge({"b": "456"}) assert q == httpx.QueryParams("a=123&b=456") q = httpx.QueryParams("a=123") q = q.merge({"a": "456", "b": "789"}) assert q == httpx.QueryParams("a=456&b=789")

Parameters
params:typing.Optional[QueryParamTypes]Undocumented
Returns
QueryParamsUndocumented
def multi_items(self): (source)

Return all items in the query params. Allow duplicate keys to occur. Usage: q = httpx.QueryParams("a=123&a=456&b=789") assert list(q.multi_items()) == [("a", "123"), ("a", "456"), ("b", "789")]

Returns
typing.List[typing.Tuple[str, str]]Undocumented
def remove(self, key): (source)

Return a new QueryParams instance, removing the value of a key. Usage: q = httpx.QueryParams("a=123") q = q.remove("a") assert q == httpx.QueryParams("")

Parameters
key:strUndocumented
Returns
QueryParamsUndocumented
def set(self, key, value=None): (source)

Return a new QueryParams instance, setting the value of a key. Usage: q = httpx.QueryParams("a=123") q = q.set("a", "456") assert q == httpx.QueryParams("a=456")

Parameters
key:strUndocumented
value:typing.AnyUndocumented
Returns
QueryParamsUndocumented
def update(self, params=None): (source)

Undocumented

Parameters
params:typing.Optional[QueryParamTypes]Undocumented
def values(self): (source)

Return all the values in the query params. If a key occurs more than once only the first item for that key is returned. Usage: q = httpx.QueryParams("a=123&a=456&b=789") assert list(q.values()) == ["123", "789"]

Returns
typing.ValuesView[str]Undocumented

Undocumented