streaming-form-data
Streaming parser for multipart/form-data
What it is and what it does
streaming_form_data is a Python parser for multipart/form-data streams, the encoding used when HTML forms submit data over HTTP. Instead of buffering the entire request body in memory, it processes incoming chunks as they arrive, making it suitable for handling large file uploads without memory exhaustion.
The parser works by registering target handlers for named form fields—you can write to local files, cloud storage (S3, GCS), discard data, or capture values. It depends on smart-open for cloud storage abstraction and aiofiles for async file operations. The package includes a C extension for performance and is actively maintained with wheels for Python 3.10–3.14 on major platforms.
Use it for:
- Upload gigabyte-sized files through a web form without consuming proportional memory.
- Stream form submissions directly to S3 or Google Cloud Storage without intermediate local buffering.
- Parse multipart requests in FastAPI or Flask applications where standard form handling is too slow.
- Process form data in resource-constrained environments (embedded systems, serverless functions) where memory is limited.
- Handle concurrent file uploads by processing each stream independently without blocking.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses multipart/form-data streams chunk-by-chunk without buffering entire payloads, enabling efficient handling of large file uploads in web applications.
Yes, if you need to handle large file uploads or memory-constrained streaming scenarios. The active maintenance, permissive license, and availability of pre-built wheels make it low-risk. The C extension requirement adds modest friction on non-standard platforms, but wheels cover common environments. No known vulnerabilities. Suitable for production use in web applications.
Install
streaming-form-data on PyPI
pip
pip install streaming-form-datauv
uv add streaming-form-datapoetry
poetry add streaming-form-dataInstalling streaming-form-data
Before you install
Medium install friction due to C extension compilation requirement. The package is actively maintained with a recent release (65 days ago) and supports current Python versions (3.10–3.14). Pre-built wheels are available for common platforms (macOS ARM64, Linux x86_64, Windows), reducing friction on standard environments.
License in practice
Licensed under MIT (permissive), so you can use it freely in commercial and open-source projects without copyleft obligations.
Quickstart
from streaming_form_data import StreamingFormDataParser
from streaming_form_data.targets import FileTarget, ValueTarget
headers = {"Content-Type": "multipart/form-data; boundary=boundary"}
parser = StreamingFormDataParser(headers=headers)
parser.register("file", FileTarget("/path/to/file.txt"))
parser.register("name", ValueTarget())
for chunk in request.body:
parser.data_received(chunk)
Requires a working C compiler to build the C extension during installation (on Debian-based systems, typically the build-essentials package).
Verify before relying
- Whether the package works with async frameworks like FastAPI out of the box or requires additional integration.
- Performance characteristics and memory overhead compared to standard form parsing in specific web frameworks.
- Whether S3Target and GCSTarget require additional credentials or configuration beyond what the fact sheet shows.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — smart-open, aiofiles |
| Maintenance | actively maintained — 65 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 528,676/month — #6,163 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: streaming_form_data-2.1.0-cp310-cp310-macosx_11_0_arm64.whl; streaming_form_data-2.1.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; streaming_form_data-2.1.0-cp310-cp310-musllinux_1_2_x86_64.whl; streaming_form_data-2.1.0-cp310-cp310-win32.whl; streaming_form_data-2.1.0-cp310-cp310-win_amd64.whl; streaming_form_data-2.1.0-cp311-cp311-macosx_11_0_arm64.whl; streaming_form_data-2.1.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; streaming_form_data-2.1.0-cp311-cp311-musllinux_1_2_x86_64.whl; streaming_form_data-2.1.0-cp311-cp311-win32.whl; streaming_form_data-2.1.0-cp311-cp311-win_amd64.whl; streaming_form_data-2.1.0-cp312-cp312-macosx_11_0_arm64.whl; streaming_form_data-2.1.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; streaming_form_data-2.1.0-cp312-cp312-musllinux_1_2_x86_64.whl; streaming_form_data-2.1.0-cp312-cp312-win32.whl; streaming_form_data-2.1.0-cp312-cp312-win_amd64.whl; streaming_form_data-2.1.0-cp313-cp313-macosx_11_0_arm64.whl; streaming_form_data-2.1.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; streaming_form_data-2.1.0-cp313-cp313-musllinux_1_2_x86_64.whl; streaming_form_data-2.1.0-cp313-cp313-win32.whl; streaming_form_data-2.1.0-cp313-cp313-win_amd64.whl
Keywords: cython, form-data, forms, http, multipart, streaming, web
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
multipartParses multipart/form-data submissions with…
permissive · top 5,000 on PyPI
python-multipartParses multipart form data from HTTP requests…
permissive · top 1,000 on PyPI
iterable-ioWraps iterables (generators, lists, etc.) as…
copyleft · top 15,000 on PyPI
requests-toolbeltProvides utilities for the requests library,…
permissive · top 1,000 on PyPI
microsoft-kiota-serialization-multipartHandles multipart/form-data serialization for…
permissive · top 5,000 on PyPI
Flask-WTFFlask-WTF integrates WTForms with Flask to…
permissive · top 5,000 on PyPI
stream-zipConstructs ZIP archives on-the-fly without…
permissive · top 15,000 on PyPI
sentence-streamSplits text streams into sentences even when…
permissive · top 15,000 on PyPI
tuspyserverA FastAPI router that implements the tus…
unclear · top 15,000 on PyPI
s3transfers3transfer manages concurrent uploads and…
permissive · top 100 on PyPI