Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 421 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 421 Bytes

httpx-pkcs12

Addon which activates PKCS12 certificates usage with HTTPX client.

Usage

with open('path/to/your/cert', 'rb') as f:
    cert_contents = f.read()
password = 'your-secret-password'

context = create_ssl_context(cert_contents, password)

# async version
async with httpx.AsyncClient(verify=context) as client:
    response = ...

# or sync version
response = httpx.get(..., verify=context)