--- id: requests-pkcs12 version: "1.27" license: ISC license_treatment: permissive maintenance: aging --- # requests-pkcs12 — Add PKCS#12 support to the requests library in a clean way, without monkey patching or temporary files License: permissive · Maintenance: aging · Downloads: 1.3M/mo ## What it is and what it does requests-pkcs12 extends the requests library to handle PKCS#12 (p12/pfx) certificate files for mutual TLS authentication. Instead of monkey patching or writing unencrypted temporary files, it creates a custom TransportAdapter that provides a custom SSLContext, integrating cleanly into requests' design. You can use it as a drop-in replacement for one-off requests or mount it to a session for repeated authenticated calls. The package depends on cryptography for certificate handling and requests itself. It supports both file-based and in-memory certificate data, accepts optional password protection, and allows SSL protocol version configuration. The authors position it as a transitional solution until requests adds native PKCS#12 support. Use it for: - Authenticate to APIs that require client certificates in PKCS#12 format without managing temporary unencrypted files. - Build a requests Session with persistent PKCS#12-based authentication for repeated calls to the same endpoint. - Migrate legacy systems using p12 certificates to Python without rewriting certificate handling infrastructure. - Test HTTPS endpoints that enforce mutual TLS with client certificate validation during CI/CD pipelines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds PKCS#12 certificate support to the requests library without monkey patching, enabling client certificate authentication over HTTPS. Yes, if you need PKCS#12 support for requests. The implementation is clean, dependencies are minimal, and the license is permissive. The aging maintenance status (341 days since last release) is a minor concern but not a blocker—the package is stable and the repository remains active. No known vulnerabilities. Install if client certificate authentication is a requirement; skip if you can use PEM certificates directly. ## Install pip install requests-pkcs12 uv add requests-pkcs12 poetry add requests-pkcs12 ## Installing requests-pkcs12 Before you install: Low friction install with only two runtime dependencies (cryptography and requests). Maintenance is aging—last release was 341 days ago—but the repository remains active and the package is marked Production/Stable. License in practice: ISC license is permissive and places minimal restrictions on use or redistribution, making it suitable for most commercial and open-source projects. Quickstart: pip install requests-pkcs12 from requests_pkcs12 import get r = get('https://example.com/test', pkcs12_filename='clientcert.p12', pkcs12_password='correcthorsebatterystaple') Requires Python 3.7 or later; cryptography and requests must be installed as runtime dependencies. Verify before relying: - Whether the package is actively maintained or in maintenance-only mode given the 341-day gap since last release. - Performance characteristics when handling large or many PKCS#12 certificates in high-throughput scenarios. ## Package facts - License: ISC (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pkcs12 certificate requests, client certificate authentication python, requests ssl certificate, p12 certificate support, https client cert python, requests custom ssl context, certificate-based authentication, tls-client-auth, certificate-handling [View on SkillFed](https://skillfed.io/packages/requests-pkcs12) · [View on PyPI](https://pypi.org/project/requests-pkcs12/)