Skip to main content

Python multipart/form-data parser

Tests Status Latest Version Supported Python Version License

This module provides a fast incremental non-blocking parser for multipart/form-data [HTML5, RFC7578], as well as blocking alternatives for easier use in WSGI or CGI applications:

  • PushMultipartParser: Fast SansIO (incremental, non-blocking) parser suitable for ASGI, asyncio and other IO, time or memory constrained environments.

  • MultipartParser: Streaming parser that reads from a byte stream and yields memory- or disk-buffered MultipartPart instances.

  • WSGI Helper: High-level functions and containers for WSGI or CGI applications with support for both multipart and urlencoded form submissions.

Features

  • Pure python single file module with no dependencies.

  • Optimized for both blocking and non-blocking applications.

  • 100% test coverage with test data from actual browsers and HTTP clients.

  • High throughput and low latency (see benchmarks).

  • Predictable memory and disk resource consumption via fine grained limits.

  • Strict mode: Spent less time parsing malicious or broken inputs.

Scope and compatibility

All parsers in this module implement multipart/form-data as defined by HTML5 and RFC7578, supporting all modern browsers or HTTP clients in use today. Legacy browsers (e.g. IE6) are supported to some degree, but only if the required workarounds do not impact performance or security. In detail this means:

  • Just multipart/form-data, not suitable for email parsing.

  • No multipart/mixed support (deprecated in RFC7578).

  • No base64 or quoted-printable transfer encoding (deprecated in RFC7578).

  • No encoded-word or name=_charset_ encoding markers (deprecated in HTML5).

  • No support for clearly broken clients (e.g. invalid line breaks or headers).

Installation

pip install multipart

Documentation

Examples and API documentation can be found at: https://multipart.readthedocs.io/

License

Code and documentation are available under MIT License (see LICENSE).

Metadata

Release files for multipart 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multipart 1.3.2
File Size Uploaded Provenance Actions
multipart-1.3.2.tar.gz 40.6 kB Without provenance Details for multipart-1.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for multipart 1.3.2
File Interpreter ABI Platform Actions
multipart-1.3.2-py3-none-any.whl Python 3 none any Details for multipart-1.3.2-py3-none-any.whl

Total release size: 56.2 kB

Release files / multipart-1.3.2.tar.gz

Download URL multipart-1.3.2.tar.gz
Size 40.6 kB
Tags Source
SHA-256 checksum
How to use checksums
10a06d76a3d07bcc6034a4f11700047102c92d7ce35cff4015a326f2178e8f93
BLAKE2b-256 checksum
How to use checksums
de6ca9b519ee2a67d3fb650ecfb688f074ce7b92f9fcacc8c70255a00c3edf38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / multipart-1.3.2-py3-none-any.whl

Download URL multipart-1.3.2-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
434e3760a1548adcdf2e02f0042425e9877338e095c67965a6a3735a5c16c9b1
BLAKE2b-256 checksum
How to use checksums
56104c10834aa287b33fb2c9af7fe9959c1edb200dbd1d8c25be7403b88d71b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for multipart 1.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page