--- id: requests-toolbelt version: "1.0.0" license: Apache 2.0 license_treatment: permissive maintenance: dormant --- # requests-toolbelt — A utility belt for advanced users of python-requests License: permissive · Maintenance: dormant · Popularity: top 1,000 on PyPI ## Install pip install requests-toolbelt uv add requests-toolbelt poetry add requests-toolbelt ## Description 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',... ## AI interpretation — verify before relying 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. 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. [View on SkillFed](https://skillfed.io/packages/requests-toolbelt) · [View on PyPI](https://pypi.org/project/requests-toolbelt/)