class sanic.compat.Header

Bases: multidict._multidict.CIMultiDict

Container used for both request and response headers. 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().


key (str) –


class sanic.log.Colors(value)

Bases: str, enum.Enum

An enumeration.

sanic.log.access_logger = <Logger sanic.access (WARNING)>

Logger used by Sanic for access logging

sanic.log.error_logger = <Logger sanic.error (WARNING)>

Logger used by Sanic for error logging

sanic.log.logger = <Logger sanic.root (WARNING)>

General Sanic logger