Classes | |
| class | HassClientResponse |
| class | HomeAssistantTCPConnector |
Functions | |
| aiohttp.ClientSession | _async_create_clientsession (HomeAssistant hass, bool verify_ssl=True, Callable[[HomeAssistant, aiohttp.ClientSession], None]|None auto_cleanup_method=None, socket.AddressFamily family=socket.AF_UNSPEC, ssl_util.SSLCipherList ssl_cipher=ssl_util.SSLCipherList.PYTHON_DEFAULT, **Any kwargs) |
| aiohttp.BaseConnector | _async_get_connector (HomeAssistant hass, bool verify_ssl=True, socket.AddressFamily family=socket.AF_UNSPEC, ssl_util.SSLCipherList ssl_cipher=ssl_util.SSLCipherList.PYTHON_DEFAULT) |
| None | _async_register_clientsession_shutdown (HomeAssistant hass, aiohttp.ClientSession clientsession) |
| None | _async_register_default_clientsession_shutdown (HomeAssistant hass, aiohttp.ClientSession clientsession) |
| tuple[bool, socket.AddressFamily, ssl_util.SSLCipherList] | _make_key (bool verify_ssl=True, socket.AddressFamily family=socket.AF_UNSPEC, ssl_util.SSLCipherList ssl_cipher=ssl_util.SSLCipherList.PYTHON_DEFAULT) |
| web.StreamResponse | async_aiohttp_proxy_stream (HomeAssistant hass, web.BaseRequest request, aiohttp.StreamReader stream, str|None content_type, int buffer_size=102400, int timeout=10) |
| web.StreamResponse|None | async_aiohttp_proxy_web (HomeAssistant hass, web.BaseRequest request, Awaitable[aiohttp.ClientResponse] web_coro, int buffer_size=102400, int timeout=10) |
| aiohttp.ClientSession | async_create_clientsession (HomeAssistant hass, bool verify_ssl=True, bool auto_cleanup=True, socket.AddressFamily family=socket.AF_UNSPEC, ssl_util.SSLCipherList ssl_cipher=ssl_util.SSLCipherList.PYTHON_DEFAULT, **Any kwargs) |
| aiohttp.ClientSession | async_get_clientsession (HomeAssistant hass, bool verify_ssl=True, socket.AddressFamily family=socket.AF_UNSPEC, ssl_util.SSLCipherList ssl_cipher=ssl_util.SSLCipherList.PYTHON_DEFAULT) |
Variables | |
| tuple | ENABLE_CLEANUP_CLOSED |
| int | MAXIMUM_CONNECTIONS = 4096 |
| int | MAXIMUM_CONNECTIONS_PER_HOST = 100 |
| tuple | SERVER_SOFTWARE |
| string | WARN_CLOSE_MSG = "closes the Home Assistant aiohttp session" |
Helper for aiohttp webclient stuff.
|
private |
Create a new ClientSession with kwargs, i.e. for cookies.
Definition at line 149 of file aiohttp_client.py.
|
private |
Return the connector pool for aiohttp. This method must be run in the event loop.
Definition at line 313 of file aiohttp_client.py.
|
private |
Register ClientSession close on Home Assistant shutdown or config entry unload. This method must be run in the event loop.
Definition at line 246 of file aiohttp_client.py.
|
private |
Register default ClientSession close on Home Assistant shutdown. This method must be run in the event loop.
Definition at line 271 of file aiohttp_client.py.
|
private |
Make a key for connector or session pool.
Definition at line 288 of file aiohttp_client.py.
| web.StreamResponse homeassistant.helpers.aiohttp_client.async_aiohttp_proxy_stream | ( | HomeAssistant | hass, |
| web.BaseRequest | request, | ||
| aiohttp.StreamReader | stream, | ||
| str | None | content_type, | ||
| int | buffer_size = 102400, |
||
| int | timeout = 10 |
||
| ) |
Stream a stream to aiohttp web response.
Definition at line 218 of file aiohttp_client.py.
| web.StreamResponse | None homeassistant.helpers.aiohttp_client.async_aiohttp_proxy_web | ( | HomeAssistant | hass, |
| web.BaseRequest | request, | ||
| Awaitable[aiohttp.ClientResponse] | web_coro, | ||
| int | buffer_size = 102400, |
||
| int | timeout = 10 |
||
| ) |
Stream websession request to aiohttp web response.
Definition at line 185 of file aiohttp_client.py.
| aiohttp.ClientSession homeassistant.helpers.aiohttp_client.async_create_clientsession | ( | HomeAssistant | hass, |
| bool | verify_ssl = True, |
||
| bool | auto_cleanup = True, |
||
| socket.AddressFamily | family = socket.AF_UNSPEC, |
||
| ssl_util.SSLCipherList | ssl_cipher = ssl_util.SSLCipherList.PYTHON_DEFAULT, |
||
| **Any | kwargs | ||
| ) |
Create a new ClientSession with kwargs, i.e. for cookies. If auto_cleanup is False, you need to call detach() after the session returned is no longer used. Default is True, the session will be automatically detached on homeassistant_stop or when being created in config entry setup, the config entry is unloaded. This method must be run in the event loop.
Definition at line 117 of file aiohttp_client.py.
| aiohttp.ClientSession homeassistant.helpers.aiohttp_client.async_get_clientsession | ( | HomeAssistant | hass, |
| bool | verify_ssl = True, |
||
| socket.AddressFamily | family = socket.AF_UNSPEC, |
||
| ssl_util.SSLCipherList | ssl_cipher = ssl_util.SSLCipherList.PYTHON_DEFAULT |
||
| ) |
Return default aiohttp ClientSession. This method must be run in the event loop.
Definition at line 87 of file aiohttp_client.py.
| tuple homeassistant.helpers.aiohttp_client.ENABLE_CLEANUP_CLOSED |
Definition at line 47 of file aiohttp_client.py.
| int homeassistant.helpers.aiohttp_client.MAXIMUM_CONNECTIONS = 4096 |
Definition at line 68 of file aiohttp_client.py.
| int homeassistant.helpers.aiohttp_client.MAXIMUM_CONNECTIONS_PER_HOST = 100 |
Definition at line 69 of file aiohttp_client.py.
| tuple homeassistant.helpers.aiohttp_client.SERVER_SOFTWARE |
Definition at line 42 of file aiohttp_client.py.
| string homeassistant.helpers.aiohttp_client.WARN_CLOSE_MSG = "closes the Home Assistant aiohttp session" |
Definition at line 55 of file aiohttp_client.py.