From ce3656ddaf4e4e432da6e0cda8b646c5fb642197 Mon Sep 17 00:00:00 2001 From: ochsec Date: Sun, 25 Oct 2026 20:47:57 +0000 Subject: [PATCH 1/2] docs: expand README with overview, capabilities, requirements --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 52e9e98..f77963c 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,34 @@ Test coverage is currently 100%. ## Why? Because streaming uploads are awesome for large files. + +## Overview + +`python-multipart` parses `multipart/form-data`, `octet-stream`, and +query-string request bodies in a streaming fashion: data is fed to the parser +incrementally and callbacks fire as parts are discovered, so large uploads can +be handled without buffering the whole body in memory. + +## Capabilities + +- **Streaming parsers**: `MultipartParser`, `FormParser`, `OctetStreamParser`, + `QuerystringParser`, and `BaseParser` for building custom parsers. +- **Convenience helpers**: `parse_form` and `create_form_parser` for the common + case of reading a form submission into callbacks. +- **Header utilities**: `parse_options_header` for extracting multipart + boundaries and other parameters from `Content-Type`. +- **Decoders**: included decoders for transfer encodings. +- **Callback-driven API**: `on_part_begin`, `on_part_data`, `on_part_end`, + `on_field`, `on_file`, etc., invoked as data arrives. +- **Zero runtime dependencies**: pure Python, no third-party packages required. + +## Installation + +```console +pip install python-multipart +``` + +## Requirements + +- Python 3.11+ +- No runtime dependencies. From f3660a024b641042a4c5372a280821e01e24f3e1 Mon Sep 17 00:00:00 2001 From: Chris Ochsenreither Date: Sun, 25 Oct 2026 16:54:20 -0400 Subject: [PATCH 2/2] docs: address cubic review on README capabilities wording --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f77963c..622d5c5 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ be handled without buffering the whole body in memory. case of reading a form submission into callbacks. - **Header utilities**: `parse_options_header` for extracting multipart boundaries and other parameters from `Content-Type`. -- **Decoders**: included decoders for transfer encodings. -- **Callback-driven API**: `on_part_begin`, `on_part_data`, `on_part_end`, - `on_field`, `on_file`, etc., invoked as data arrives. +- **Decoders**: `Base64Decoder` and `QuotedPrintableDecoder` for transfer encodings. +- **Callback-driven API**: `on_part_begin`, `on_part_data`, and `on_part_end` run + incrementally; `on_field` and `on_file` fire after each complete field or file. - **Zero runtime dependencies**: pure Python, no third-party packages required. ## Installation