Container used for both request and response headers.

Inherits from: CIMultiDict, MultiDict

class Header(self)

It is a subclass of CIMultiDict

It allows for multiple values for a single key in keeping with the HTTP spec. Also, all keys are case in-sensitive.

Please checkout the MultiDict documentation for more details about how to use the object. In general, it should work very similar to a regular dictionary.


Convenience method mapped to getall().

def get_all(self, key: <class 'str'>)


Base class for string enums that are case insensitive.

Inherits from: StrEnum, str, ReprEnum, Enum

class UpperStrEnum(value, names = None, module = None, qualname = None, type = None, start = 1, boundary = None)


def ctrlc_workaround_for_windows(app)


def enable_windows_color_support()


async def open_async(file, mode = r, kwargs)


The PyPy os module is missing the 'readlink' function, which causes issues

def pypy_os_module_patch(): -> None

withaiofiles. This workaround replaces the missing 'readlink' function with 'os.path.realpath', which serves the same purpose.


A patch function for PyPy on Windows that sets the console code page to

def pypy_windows_set_console_cp_patch(): -> None

UTF-8 encodingto allow for proper handling of non-ASCII characters. This function uses ctypes to call the Windows API functions SetConsoleCP and SetConsoleOutputCP to set the code page.


def use_context(method: typing.Union[sanic.helpers.Default, typing.Literal['fork'], typing.Literal['forkserver'], typing.Literal['spawn']])