Skip to main content

django-fast-multipart

PyPI Python Documentation Status

django-fast-multipart is a Rust-backed multipart upload parser for Django. It uses Django's parser extension point while keeping the existing upload handlers, request limits, request.POST, and request.FILES interfaces.

The project currently supports CPython 3.12 or later and Django 6.1.

Installation

python -m pip install django-fast-multipart

Prebuilt wheels are available for Linux x86-64 and ARM64, macOS Intel and Apple Silicon, and Windows x86-64. Other platforms can build from the source distribution with a Rust toolchain.

Quick start

For application-wide use, add the middleware before CSRF or anything else that reads request.POST or request.FILES:

MIDDLEWARE = [
    "django_fast_multipart.middleware.FastMultipartMiddleware",
    "django.middleware.csrf.CsrfViewMiddleware",
    # Other middleware...
]

Your views continue to use Django's normal request API:

def upload(request):
    description = request.POST.get("description", "")
    uploaded_file = request.FILES["file"]
    # Process the uploaded file.

To select it only for one view:

from django_fast_multipart import RustMultiPartParser


def upload(request):
    request.multipart_parser_class = RustMultiPartParser
    uploaded_file = request.FILES["file"]
    # Process the uploaded file.

The parser must be selected before request data is read. Both synchronous WSGI and asynchronous ASGI request stacks are supported, and non-multipart requests remain unchanged.

Documentation

Read the complete guide at django-fast-multipart.readthedocs.io. It covers installation, middleware ordering, per-view setup, upload handlers, compatibility, performance, troubleshooting, and development.

Performance

Reference microbenchmarks show the clearest reduction in parser overhead for field-heavy forms and in-memory uploads. Temporary-file uploads benefit less because file I/O and upload-handler work dominate. These results are parser-level measurements, not end-to-end application guarantees; see the benchmark methodology for details.

Project status

The project is currently beta. Its behavior is extensively tested against Django's MultiPartParser, including built-in upload handlers, upload limits, WSGI and ASGI integration, and cleanup after exceptions. Production feedback for custom upload handlers is welcome.

Development

uv sync
uv run pytest
uv run ruff check .
uv run ruff format --check .
cargo fmt --manifest-path rust/Cargo.toml --check
cargo clippy --manifest-path rust/Cargo.toml --locked --all-targets --all-features -- -D warnings
uv build

See the development documentation and release guide for more details.

License

The project is licensed under MIT. See THIRD_PARTY_NOTICES.md for the native parser's upstream attribution and licensing details.

Metadata

Release files for django-fast-multipart 0.1.1

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

Source distribution (sdist)

Source distribution for django-fast-multipart 0.1.1
File Size Uploaded
django_fast_multipart-0.1.1.tar.gz 15.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for django-fast-multipart 0.1.1
File
django_fast_multipart-0.1.1-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
django_fast_multipart-0.1.1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details
django_fast_multipart-0.1.1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details
django_fast_multipart-0.1.1-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
django_fast_multipart-0.1.1-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details

Total release size: 1.2 MB

Release files / django_fast_multipart-0.1.1.tar.gz

Download URL django_fast_multipart-0.1.1.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cf989fd853a4d8d65e0a9732f78bdfa23d35d7d1ca911baaaa46e2d9f927e336
BLAKE2b-256 checksum
How to use checksums
18c03531707427dc8a467921cd6ff72d164361acc04cff84eadda7a4ae6ca682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / django_fast_multipart-0.1.1-cp312-abi3-win_amd64.whl

Download URL django_fast_multipart-0.1.1-cp312-abi3-win_amd64.whl
Size 158.7 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
79b21752f868e11ed56fede3fd8cb7d09e978b464219eef592093432390ae759
BLAKE2b-256 checksum
How to use checksums
3bd1fb7f1b519a327a1f7c0f393a4275b26e2743d11e0da013423151005d3bdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / django_fast_multipart-0.1.1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL django_fast_multipart-0.1.1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 276.0 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
fe585fdcb8d2c9d67f2f2ee633717144d4ca19254d5d6f975cb23fdd70de1d05
BLAKE2b-256 checksum
How to use checksums
d56e2ea465b249b2e02f999a96278cd55071156d69ef87f5fa60222fc58b7c6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / django_fast_multipart-0.1.1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL django_fast_multipart-0.1.1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 268.8 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
6daab866fba6f55507668c319682ac43edb4bb363c6ff2e87e39ffd4d099558e
BLAKE2b-256 checksum
How to use checksums
608f72f2b95f29217d5edb310b3dee8da3545bcf0ff8d6b7fef3b5d447f35eb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / django_fast_multipart-0.1.1-cp312-abi3-macosx_11_0_arm64.whl

Download URL django_fast_multipart-0.1.1-cp312-abi3-macosx_11_0_arm64.whl
Size 246.8 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e7debc1e067b1fa1678fc54d76b6dfceeaba7b1572029dabe123baad1b7b795f
BLAKE2b-256 checksum
How to use checksums
d34e301d00c66fe328cb314a7cb4f9d5fbb58c238ff126d07997be1ee84b04ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / django_fast_multipart-0.1.1-cp312-abi3-macosx_10_12_x86_64.whl

Download URL django_fast_multipart-0.1.1-cp312-abi3-macosx_10_12_x86_64.whl
Size 260.4 kB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8813395b38b47ce4e0a2cf27d055652e64e067f27c2e7016024708b869c74b19
BLAKE2b-256 checksum
How to use checksums
0d04b8ab6056a2991efee125431103ef7b939223b641af0cfd2af6d19c007c79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

6 release files

This release

0.1.1 This release

6 release files

0.1.0

6 release files

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