Skip to main content

python-multipart-rust

Stage-1 Rust mirror of Kludex/python-multipart (python-multipart 0.0.32, Apache-2.0): a streaming multipart parser for Python.

Boundary

The CPU hot path — the two byte-level state machines (MultipartParser._internal_write, QuerystringParser._internal_write) plus parse_options_header/_parseparam — lives in the reusable multipart-rust-core crate (no Python dependency) with a thin PyO3 binding (python_multipart._python_multipart). Everything else is the upstream source verbatim:

  • ported to Rust: multipart + querystring state machines, options-header parsing;
  • kept in Python: Field, File (file I/O + tempfile spooling), BaseParser, OctetStreamParser (no byte loop), FormParser, create_form_parser, parse_form, decoders, exceptions.

python_multipart/ keeps the exact public interface (including MultipartState/QuerystringState member identity and per-chunk error offsets); the legacy multipart/ alias package ships unchanged.

Build

python3 -m venv .venv && . .venv/bin/activate
pip install maturin
maturin develop --release
python3 -m pytest tests/ -q

Layout

  • python_multipart-core/ — reusable Rust core (multipart-rust-core on crates.io).
  • src/lib.rs — PyO3 binding (python_multipart._python_multipart).
  • python_multipart/ — Python package (hot paths delegate to the core).
  • multipart/ — legacy alias (upstream-verbatim).
  • tests/ — upstream suite (frozen oracle; do not weaken).

Measured performance

No accepted optimizations yet (mirror baseline); re-run release-prep after run --stage optimize merges winners. Artifact hashes are intentionally absent here; see release-manifest.json.

Metadata

Release files for python-multipart-rust 0.0.32

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

Source distribution (sdist)

Source distribution for python-multipart-rust 0.0.32
File Size Uploaded Provenance
python_multipart_rust-0.0.32.tar.gz 35.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-multipart-rust 0.0.32
File Interpreter ABI Platform
python_multipart_rust-0.0.32-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details

Total release size: 353.8 kB

Release files / python_multipart_rust-0.0.32.tar.gz

Download URL python_multipart_rust-0.0.32.tar.gz
Size 35.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e851e795956bc3b132a79b9f8165a3842a8f287df324a8888f089dc053ee86fc
BLAKE2b-256 checksum
How to use checksums
fd3c7d55c1926a51e2d0222544cafb1fed6009720779af6b3931743472edb41a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / python_multipart_rust-0.0.32-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL python_multipart_rust-0.0.32-cp312-cp312-manylinux_2_34_x86_64.whl
Size 318.1 kB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
7d1b3660cd7b19dc555f0f0aaebdf427a0039957c5e5a9a65d35bf133e4fdefc
BLAKE2b-256 checksum
How to use checksums
c51e8819e8d9c5b5ae977520a924c90dbbacfdbb4aeb7d993088d92a0332c584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for python-multipart-rust 0.0.32

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.

Release history Release notifications | RSS feed

This release

0.0.32 This release

2 release files No provenance

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