Skip to content

Commit

Permalink
docs: ✨ convert sphinx tables to markdown tables in parsers
Browse files Browse the repository at this point in the history
Signed-off-by: Onuralp SEZER <[email protected]>
  • Loading branch information
onuralpszr committed Feb 11, 2024
1 parent 0d2303f commit 8372098
Showing 1 changed file with 23 additions and 77 deletions.
100 changes: 23 additions & 77 deletions multipart/multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,22 +681,11 @@ class OctetStreamParser(BaseParser):
"""This parser parses an octet-stream request body and calls callbacks when
incoming data is received. Callbacks are as follows:
.. list-table::
:widths: 15 10 30
:header-rows: 1
* - Callback Name
- Parameters
- Description
* - on_start
- None
- Called when the first data is parsed.
* - on_data
- data, start, end
- Called for each data chunk that is parsed.
* - on_end
- None
- Called when the parser is finished parsing all data.
| Callback Name | Parameters | Description |
|---------------|-----------------|--------------------------------------------------|
| on_start | None | Called when the first data is parsed. |
| on_data | data, start, end| Called for each data chunk that is parsed. |
| on_end | None | Called when the parser is finished parsing all data. |
:param callbacks: A dictionary of callbacks. See the documentation for
:class:`BaseParser`.
Expand Down Expand Up @@ -758,28 +747,13 @@ class QuerystringParser(BaseParser):
"""This is a streaming querystring parser. It will consume data, and call
the callbacks given when it has data.
.. list-table::
:widths: 15 10 30
:header-rows: 1
* - Callback Name
- Parameters
- Description
* - on_field_start
- None
- Called when a new field is encountered.
* - on_field_name
- data, start, end
- Called when a portion of a field's name is encountered.
* - on_field_data
- data, start, end
- Called when a portion of a field's data is encountered.
* - on_field_end
- None
- Called when the end of a field is encountered.
* - on_end
- None
- Called when the parser is finished parsing all data.
| Callback Name | Parameters | Description |
|----------------|-----------------|-----------------------------------------------------|
| on_field_start | None | Called when a new field is encountered. |
| on_field_name | data, start, end| Called when a portion of a field's name is encountered. |
| on_field_data | data, start, end| Called when a portion of a field's data is encountered. |
| on_field_end | None | Called when the end of a field is encountered. |
| on_end | None | Called when the parser is finished parsing all data.|
:param callbacks: A dictionary of callbacks. See the documentation for
:class:`BaseParser`.
Expand Down Expand Up @@ -1007,45 +981,17 @@ def __repr__(self) -> str:
class MultipartParser(BaseParser):
"""This class is a streaming multipart/form-data parser.
.. list-table::
:widths: 15 10 30
:header-rows: 1
* - Callback Name
- Parameters
- Description
* - on_part_begin
- None
- Called when a new part of the multipart message is encountered.
* - on_part_data
- data, start, end
- Called when a portion of a part's data is encountered.
* - on_part_end
- None
- Called when the end of a part is reached.
* - on_header_begin
- None
- Called when we've found a new header in a part of a multipart
message
* - on_header_field
- data, start, end
- Called each time an additional portion of a header is read (i.e. the
part of the header that is before the colon; the "Foo" in
"Foo: Bar").
* - on_header_value
- data, start, end
- Called when we get data for a header.
* - on_header_end
- None
- Called when the current header is finished - i.e. we've reached the
newline at the end of the header.
* - on_headers_finished
- None
- Called when all headers are finished, and before the part data
starts.
* - on_end
- None
- Called when the parser is finished parsing all data.
| Callback Name | Parameters | Description |
|----------------------|-----------------|-----------------------------------------------------------------------------|
| on_part_begin | None | Called when a new part of the multipart message is encountered. |
| on_part_data | data, start, end| Called when a portion of a part's data is encountered. |
| on_part_end | None | Called when the end of a part is reached. |
| on_header_begin | None | Called when we've found a new header in a part of a multipart message. |
| on_header_field | data, start, end| Called each time an additional portion of a header is read. |
| on_header_value | data, start, end| Called when we get data for a header. |
| on_header_end | None | Called when the current header is finished. |
| on_headers_finished | None | Called when all headers are finished, and before the part data starts. |
| on_end | None | Called when the parser is finished parsing all data. |
:param boundary: The multipart boundary. This is required, and must match
Expand Down

0 comments on commit 8372098

Please sign in to comment.