A security-hardened wrapper around the Python requests library that overrides default behaviors to prevent SSRF attacks, enforce TLS best practices, restrict IP ranges, and add safety features. Current version 1.2.2, supports Python >=3.10, <4.0, and is maintained actively by Saleor.
pip install requests-hardenedVerified import paths — ran on the pinned version, not inferred.
Create a hardened requests Session with a Config object to enforce TLS and IP restrictions.
pip install 'requests-hardened>=1.2.1'
Use Python 3.10 or newer, or pin to <1.2.0 if stuck on 3.9.
Use the provided Session class instead of relying on monkey-patched functions. Avoid mixing with other requests wrappers.