TL;DR: Starlette split multipart form parsing into an optional dependency, so upgrading Starlette without it breaks every form endpoint with this RuntimeError. Install the missing package with pip install python-multipart. Add it to your requirements or pyproject so fresh installs include it.

```text
RuntimeError: Form data requires "python-multipart" to be installed.
```

1. Install the missing package: `pip install python-multipart`.
   Expected: output ends with a "Successfully installed python-multipart" line.
2. Verify the import works: `python -c "import multipart; print(multipart.__version__)"`.
   Expected: a version number prints with no ImportError.
3. Add python-multipart to your requirements file or pyproject dependencies.
   Expected: a fresh install from the lockfile or requirements includes it automatically.
4. Re-run the failing form endpoint or its test.
   Expected: the endpoint returns normally with no RuntimeError.

## Use this when
- The exact RuntimeError about form data requiring python-multipart appears.
- The failure started right after a Starlette or FastAPI upgrade.
- Only form or multipart upload endpoints fail; JSON endpoints still work.

## Not for this skill when
- The error is about JSON request bodies; that path never needed python-multipart.
- The import error names a different package; install that one instead.
- Starlette is not in the dependency tree at all.

## Variant phrasings
- "Form data requires python-multipart to be installed FastAPI"
- "starlette form parsing multipart missing after upgrade"
- "RuntimeError python-multipart starlette forms"
- "FastAPI file upload python-multipart not installed"

## Why it happens
Starlette moved multipart parsing out of its required dependencies to keep the base install light. Upgrading Starlette pulls the new code that raises this RuntimeError when form parsing is attempted, but package managers do not install the optional extra unless it is declared. The code path is only hit for form or file-upload requests, which is why JSON APIs keep working.

## Edge cases
- The PyPI package is named python-multipart but the import name is multipart; do not pip install a package literally named multipart.
- Docker images and CI must get the new requirement too; installing it only on your dev machine leaves CI broken.
- If you use uv, add it with `uv add python-multipart` so the lockfile records it.
- Pin a version if your deployment needs reproducible builds.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_R63zzZjfB0nAVadPDjiwJg
