requests-toolbelt
A utility belt for advanced users of python-requests
Install
requests-toolbelt on PyPI
pip
pip install requests-toolbeltuv
uv add requests-toolbeltpoetry
poetry add requests-toolbeltPackage facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | dormant — 1,200 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: requests_toolbelt-1.0.0-py2.py3-none-any.whl
About requests-toolbelt
from the package's own PyPI description — quoted content, verbatim
The Requests Toolbelt
This is just a collection of utilities for python-requests_, but don't
really belong in requests proper. The minimum tested requests version is
2.1.0. In reality, the toolbelt should work with 2.0.1 as well, but
some idiosyncracies prevent effective or sane testing on that version.
pip install requests-toolbelt to get started!
multipart/form-data Encoder
The main attraction is a streaming multipart form-data object, MultipartEncoder.
Its API looks like this:
.. code-block:: python
from requests_toolbelt import MultipartEncoder
import requests
m = MultipartEncoder(
fields={'field0': 'value', 'field1': 'value',
'field2': ('filename', open('file.py', 'rb'), 'text/plain')}
)
r = requests.post('http://httpbin.org/post', data=m,
headers={'Content-Type': m.content_type})
You can also use multipart/form-data encoding for requests that don't
require files:
.. code-block:: python
from requests_toolbelt import MultipartEncoder
import requests
m = MultipartEncoder(fields={'field0': 'value',...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
A collection of utilities extending python-requests with streaming multipart form-data encoding, SSL adapter control, cookie management, and session helpers for common HTTP patterns.
Low friction: pure-Python wheel with only requests as a runtime dependency. Maintenance is dormant (1200 days since last release), though the repository remains active with a recent commit in January 2025 and 1037 stars.
Apache 2.0 permissive license allows commercial and private use with minimal restrictions; attribution required but no copyleft obligations.
Usage
pip install requests-toolbelt
from requests_toolbelt import MultipartEncoder
import requests
m = MultipartEncoder(fields={'field0': 'value', 'field1': 'value'})
r = requests.post('http://example.com/post', data=m,
headers={'Content-Type': m.content_type})
Requires requests >= 2.1.0; minimum Python 2.7 or 3.4+
Verdict: Stable, well-established utility library for requests power users seeking multipart encoding, SSL control, and session patterns. Low install friction and no known vulnerabilities make it safe to adopt, though dormant maintenance (last release May 2023) means bug fixes may be slow; suitable for production use where the feature set meets your needs.
Needs verification
- Whether dormant status reflects intentional stability or abandonment risk for future Python/requests incompatibilities
- Real-world usage patterns and community adoption beyond the top-1000 tier indicator
Similar packages
permissive · top 100 on PyPI
json5permissive · top 1,000 on PyPI
python-multipartpermissive · top 1,000 on PyPI
SQLAlchemy-Utilspermissive · top 1,000 on PyPI
curl-cffipermissive · top 1,000 on PyPI
parsopermissive · top 1,000 on PyPI
truststorepermissive · top 1,000 on PyPI
pg8000permissive · top 1,000 on PyPI
httpx2permissive · top 1,000 on PyPI
hyperframepermissive · top 1,000 on PyPI