# quart.formparser module

class quart.formparser.FormDataParser(*, cls=MultiDict, max_content_length=None, max_form_memory_size=None, max_form_parts=None, silent=True, stream_factory=default_stream_factory)

  Bases: `object`

  Parameters:

    - cls (type[MultiDict] | None)

    - max_content_length (int | None)

    - max_form_memory_size (int | None)

    - max_form_parts (int | None)

    - silent (bool)

    - stream_factory (StreamFactory)

  file_storage_class

    alias of `FileStorage`

  get_parse_func(mimetype, options)
    Parameters:

      - mimetype (str)

      - options (dict[str, str])

    Return type:

      ParserFunc | None

  async parse(body, mimetype, content_length, options=None)
    Parameters:

      - body (Body)

      - mimetype (str)

      - content_length (int | None)

      - options (dict[str, str] | None)

    Return type:

      tuple[MultiDict, MultiDict]

  parse_functions: dict[str, ParserFunc] = {'application/x-url-encoded': <function FormDataParser._parse_urlencoded>, 'application/x-www-form-urlencoded': <function FormDataParser._parse_urlencoded>, 'multipart/form-data': <function FormDataParser._parse_multipart>}

class quart.formparser.MultiPartParser(*, buffer_size=64 * 1024, cls=MultiDict, file_storage_cls=FileStorage, max_content_length=None, max_form_memory_size=None, max_form_parts=None, stream_factory=default_stream_factory)

  Bases: `object`

  Parameters:

    - buffer_size (int)

    - cls (type[MultiDict])

    - file_storage_cls (type[FileStorage])

    - max_content_length (int | None)

    - max_form_memory_size (int | None)

    - max_form_parts (int | None)

    - stream_factory (StreamFactory)

  fail(message)
    Parameters:

      message (str)

    Return type:

      NoReturn

  get_part_charset(headers)
    Parameters:

      headers (Headers)

    Return type:

      str

  start_file_streaming(event, total_content_length)
    Parameters:

      - event (File)

      - total_content_length (int)

    Return type:

      IO[bytes]

  async parse(body, boundary, content_length)
    Parameters:

      - body (Body)

      - boundary (bytes)

      - content_length (int)

    Return type:

      tuple[MultiDict, MultiDict]