Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (26 sloc) 839 Bytes

Request API

.. module:: ai.backend.client.request
.. currentmodule:: ai.backend.client.request

This module provides low-level API request/response interfaces based on aiohttp.

Depending on the session object where the request is made from, :class:`Request` and :class:`Response` differentiate their behavior: works as plain Python functions or returns awaitables.

.. autoclass:: Request
   :exclude-members: fetch, connect_websocket

   .. automethod:: fetch
      :async-with: Response

   .. automethod:: connect_websocket
      :async-with: WebSocketResponse or its derivatives

.. autoclass:: Response

.. autoclass:: WebSocketResponse

.. autoclass:: FetchContextManager

.. autoclass:: WebSocketContextManager

.. autoclass:: AttachedFile
You can’t perform that action at this time.