skillfed

streaming-form-data

Streaming parser for multipart/form-data

streaming-form-data v2.1.0 528.7K downloads/30d#6,163 on PyPI185
Permissive license Active released

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-data

uv

uv add streaming-form-data

poetry

poetry add streaming-form-data

Installing 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

Development Status :: 4 - BetaEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: CythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: BrowsersTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Internet :: WWW/HTTP :: HTTP Servers

Tags

streaming multipart form data parserlarge file upload handlerchunked form data parsingmemory-efficient form parsinghttp multipart streamingform data without bufferingweb upload streaming
streaming-ioform-parsingweb-upload

More WWW/HTTP packages