ump.utils#

Attributes#

Functions#

join_url_parts(*parts)

fetch_response_content(→ tuple[str | dict, str, int])

Reads the content of an aiohttp response, handling both JSON and text,

fetch_json(→ dict)

Module Contents#

ump.utils.logger#
ump.utils.join_url_parts(*parts)#
async ump.utils.fetch_response_content(response: aiohttp.ClientResponse) tuple[str | dict, str, int]#

Reads the content of an aiohttp response, handling both JSON and text, regardless of HTTP status code. Returns a tuple: (content, content_type, status_code)

async ump.utils.fetch_json(session: aiohttp.ClientSession, url, raise_for_status=False, **kwargs) dict#