Requests Toolbelt
raw JSON → 1.0.0 verified Tue May 12 auth: no python install: verified quickstart: verified
A utility belt for advanced users of python-requests, providing additional functionality and tools. Current version: 1.0.0. Release cadence: As needed.
pip install requests-toolbelt Warnings
breaking Ensure correct import paths to avoid ImportError. ↓
fix Use 'from requests_toolbelt.multipart.encoder import MultipartEncoder' for MultipartEncoder.
gotcha Always set the 'Content-Type' header to the value of m.content_type when using MultipartEncoder. ↓
fix Include headers={'Content-Type': m.content_type} in your requests.
Install compatibility verified last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) - - 0.66s 21.6M
3.10 slim (glibc) - - 0.45s 22M
3.11 alpine (musl) - - 0.80s 23.7M
3.11 slim (glibc) - - 0.68s 24M
3.12 alpine (musl) - - 0.74s 15.5M
3.12 slim (glibc) - - 0.74s 16M
3.13 alpine (musl) - - 0.72s 15.1M
3.13 slim (glibc) - - 0.74s 16M
3.9 alpine (musl) - - 0.58s 20.9M
3.9 slim (glibc) - - 0.53s 21M
Imports
- MultipartEncoder
from requests_toolbelt.multipart.encoder import MultipartEncoder
Quickstart verified last tested: 2026-04-23
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
url = 'http://httpbin.org/post'
m = MultipartEncoder(fields={'field0': 'value0', 'field1': 'value1'})
response = requests.post(url, data=m, headers={'Content-Type': m.content_type})
print(response.text)