# quart.typing module

class quart.typing.ASGIHTTPProtocol(app, scope)

  Bases: `Protocol`

  Parameters:

    - app (Quart)

    - scope (HTTPScope)

class quart.typing.ASGILifespanProtocol(app, scope)

  Bases: `Protocol`

  Parameters:

    - app (Quart)

    - scope (LifespanScope)

class quart.typing.ASGIWebsocketProtocol(app, scope)

  Bases: `Protocol`

  Parameters:

    - app (Quart)

    - scope (WebsocketScope)

class quart.typing.TestHTTPConnectionProtocol(app, scope, _preserve_context=False)

  Bases: `Protocol`

  Parameters:

    - app (Quart)

    - scope (HTTPScope)

    - _preserve_context (bool)

  push_promises: list[tuple[str, Headers]]
  async send(data)
    Parameters:

      data (bytes)

    Return type:

      None

  async send_complete()
    Return type:

      None

  async receive()
    Return type:

      bytes

  async disconnect()
    Return type:

      None

  async as_response()
    Return type:

      Response

class quart.typing.TestWebsocketConnectionProtocol(app, scope)

  Bases: `Protocol`

  Parameters:

    - app (Quart)

    - scope (WebsocketScope)

  async receive()
    Return type:

      AnyStr

  async send(data)
    Parameters:

      data (AnyStr)

    Return type:

      None

  async receive_json()
    Return type:

      Any

  async send_json(data)
    Parameters:

      data (Any)

    Return type:

      None

  async close(code)
    Parameters:

      code (int)

    Return type:

      None

  async disconnect()
    Return type:

      None

class quart.typing.TestClientProtocol(app, use_cookies=True)

  Bases: `Protocol`

  Parameters:

    - app (Quart)

    - use_cookies (bool)

  app: Quart
  cookie_jar: CookieJar | None
  http_connection_class: type[TestHTTPConnectionProtocol]
  push_promises: list[tuple[str, Headers]]
  websocket_connection_class: type[TestWebsocketConnectionProtocol]
  async open(path, *, method='GET', headers=None, data=None, form=None, files=None, query_string=None, json, scheme='http', follow_redirects=False, root_path='', http_version='1.1', scope_base=None, auth=None, subdomain=None)
    Parameters:

      - path (str)

      - method (str)

      - headers (dict | Headers | None)

      - data (AnyStr | None)

      - form (dict | None)

      - files (dict[str, FileStorage] | None)

      - query_string (dict | None)

      - json (Any)

      - scheme (str)

      - follow_redirects (bool)

      - root_path (str)

      - http_version (str)

      - scope_base (dict | None)

      - auth (Authorization | tuple[str, str] | None)

      - subdomain (str | None)

    Return type:

      Response

  request(path, *, method='GET', headers=None, query_string=None, scheme='http', root_path='', http_version='1.1', scope_base=None, auth=None, subdomain=None)
    Parameters:

      - path (str)

      - method (str)

      - headers (dict | Headers | None)

      - query_string (dict | None)

      - scheme (str)

      - root_path (str)

      - http_version (str)

      - scope_base (dict | None)

      - auth (Authorization | tuple[str, str] | None)

      - subdomain (str | None)

    Return type:

      TestHTTPConnectionProtocol

  websocket(path, *, headers=None, query_string=None, scheme='ws', subprotocols=None, root_path='', http_version='1.1', scope_base=None, auth=None, subdomain=None)
    Parameters:

      - path (str)

      - headers (dict | Headers | None)

      - query_string (dict | None)

      - scheme (str)

      - subprotocols (list[str] | None)

      - root_path (str)

      - http_version (str)

      - scope_base (dict | None)

      - auth (Authorization | tuple[str, str] | None)

      - subdomain (str | None)

    Return type:

      TestWebsocketConnectionProtocol

  async delete(*args, **kwargs)
    Parameters:

      - args (Any)

      - kwargs (Any)

    Return type:

      Response

  async get(*args, **kwargs)
    Parameters:

      - args (Any)

      - kwargs (Any)

    Return type:

      Response

  async head(*args, **kwargs)
    Parameters:

      - args (Any)

      - kwargs (Any)

    Return type:

      Response

  async options(*args, **kwargs)
    Parameters:

      - args (Any)

      - kwargs (Any)

    Return type:

      Response

  async patch(*args, **kwargs)
    Parameters:

      - args (Any)

      - kwargs (Any)

    Return type:

      Response

  async post(*args, **kwargs)
    Parameters:

      - args (Any)

      - kwargs (Any)

    Return type:

      Response

  async put(*args, **kwargs)
    Parameters:

      - args (Any)

      - kwargs (Any)

    Return type:

      Response

  async trace(*args, **kwargs)
    Parameters:

      - args (Any)

      - kwargs (Any)

    Return type:

      Response

  set_cookie(server_name, key, value='', max_age=None, expires=None, path='/', domain=None, secure=False, httponly=False, samesite=None, charset='utf-8')
    Parameters:

      - server_name (str)

      - key (str)

      - value (str)

      - max_age (int | timedelta | None)

      - expires (int | float | datetime | None)

      - path (str)

      - domain (str | None)

      - secure (bool)

      - httponly (bool)

      - samesite (str)

      - charset (str)

    Return type:

      None

  delete_cookie(server_name, key, path='/', domain=None)
    Parameters:

      - server_name (str)

      - key (str)

      - path (str)

      - domain (str | None)

    Return type:

      None

  session_transaction(path='/', *, method='GET', headers=None, query_string=None, scheme='http', data=None, form=None, json=None, root_path='', http_version='1.1')
    Parameters:

      - path (str)

      - method (str)

      - headers (dict | Headers | None)

      - query_string (dict | None)

      - scheme (str)

      - data (AnyStr | None)

      - form (dict | None)

      - json (Any)

      - root_path (str)

      - http_version (str)

    Return type:

      AbstractAsyncContextManager[SessionMixin]

class quart.typing.TestAppProtocol(app)

  Bases: `Protocol`

  Parameters:

    app (Quart)

  test_client()
    Return type:

      TestClientProtocol

  async startup()
    Return type:

      None

  async shutdown()
    Return type:

      None

class quart.typing.Event(*args, **kwargs)

  Bases: `Protocol`

  is_set()
    Return type:

      bool

  set()
    Return type:

      None