# aioresponses package

## Submodules

## aioresponses.core module

class `aioresponses.core.``CallbackResult`(method: str = 'GET', status: int = 200, body: str = '', content_type: str = 'application/json', payload: Dict[KT, VT] = None, headers: Dict[KT, VT] = None, response_class: Optional[aiohttp.client_reqrep.ClientResponse] = None, reason: Optional[str] = None)

  Bases: `object`

class `aioresponses.core.``RequestCall`(args, kwargs)

  Bases: `tuple`

  `args`

    Alias for field number 0

  `kwargs`

    Alias for field number 1

class `aioresponses.core.``RequestMatch`(url: Union[yarl.URL, str, re.Pattern], method: str = 'GET', status: int = 200, body: str = '', payload: Dict[KT, VT] = None, exception: Optional[Exception] = None, headers: Dict[KT, VT] = None, content_type: str = 'application/json', response_class: Optional[aiohttp.client_reqrep.ClientResponse] = None, timeout: bool = False, repeat: bool = False, reason: Optional[str] = None, callback: Optional[Callable] = None)

  Bases: `object`

  `build_response`(url: yarl.URL, **kwargs) → Union[aiohttp.client_reqrep.ClientResponse, Exception]
  `match`(method: str, url: yarl.URL) → bool
  `match_regexp`(url: yarl.URL) → bool
  `match_str`(url: yarl.URL) → bool
  `url_or_pattern` = None

class `aioresponses.core.``aioresponses`(**kwargs)

  Bases: `object`

  Mock aiohttp requests made by ClientSession.

  `add`(url: Union[yarl.URL, str, re.Pattern], method: str = 'GET', status: int = 200, body: str = '', exception: Optional[Exception] = None, content_type: str = 'application/json', payload: Dict[KT, VT] = None, headers: Dict[KT, VT] = None, response_class: Optional[aiohttp.client_reqrep.ClientResponse] = None, repeat: bool = False, timeout: bool = False, reason: Optional[str] = None, callback: Optional[Callable] = None) → None
  `clear`()
  `delete`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `get`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `head`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `match`(method: str, url: yarl.URL, allow_redirects: bool = True, **kwargs) → Optional[aiohttp.client_reqrep.ClientResponse]
  `options`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `patch`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `post`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `put`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `requests` = None
  `start`()
  `stop`() → None

## Module contents

class `aioresponses.``CallbackResult`(method: str = 'GET', status: int = 200, body: str = '', content_type: str = 'application/json', payload: Dict[KT, VT] = None, headers: Dict[KT, VT] = None, response_class: Optional[aiohttp.client_reqrep.ClientResponse] = None, reason: Optional[str] = None)

  Bases: `object`

class `aioresponses.``aioresponses`(**kwargs)

  Bases: `object`

  Mock aiohttp requests made by ClientSession.

  `add`(url: Union[yarl.URL, str, re.Pattern], method: str = 'GET', status: int = 200, body: str = '', exception: Optional[Exception] = None, content_type: str = 'application/json', payload: Dict[KT, VT] = None, headers: Dict[KT, VT] = None, response_class: Optional[aiohttp.client_reqrep.ClientResponse] = None, repeat: bool = False, timeout: bool = False, reason: Optional[str] = None, callback: Optional[Callable] = None) → None
  `clear`()
  `delete`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `get`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `head`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `match`(method: str, url: yarl.URL, allow_redirects: bool = True, **kwargs) → Optional[aiohttp.client_reqrep.ClientResponse]
  `options`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `patch`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `post`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `put`(url: Union[yarl.URL, str, re.Pattern], **kwargs)
  `requests` = None
  `start`()
  `stop`() → None