Patch httpx to use system certificates authority bundles by default
Project description
# httpx-system-certs
This package patches httpx.AsyncClient, httpx.AsyncHTTPTransport, httpx.Client, httpx.HTTPTransport, httpx.Proxy, httpx.create_ssl_context, httpx.delete, httpx.get, httpx.head, httpx.options, httpx.patch, httpx.post, httpx.put, httpx.request and httpx.stream to use system certificates authority store by default allowing the use of self signed certificates.
## Installation
`bash pip install httpx-system-certs `
https sites trusted by your device should now also be trusted by httpx by default.
_Note: The package uses a .pth file to make the patching of httpx methods available to the python interpreter. In some environments you might need to apply the patch manually using “import httpx_system_certs” before using httpx in your code._
## Functionnality
This package uses higher order functions to patch httpx methods by providing a default value to ssl.SSLContext type arguments. This is done by inspecting the type annotation of the method’s arguments and using the truststore package to create a new SSLContext instance with the system certificates authority store.
## Aknowledgements
This package development was inspired by [Andrew Leech’s pip-system-certs package](https://gitlab.com/alelec/pip-system-certs)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file httpx_system_certs-1.0.0.tar.gz.
File metadata
- Download URL: httpx_system_certs-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
051293d9cd88683cc6ce660be1888803f075dc464e51f98114b355a8ffbc2c33
|
|
| MD5 |
46d606ddcc0c67b246f79c1f0a61d969
|
|
| BLAKE2b-256 |
48747a095893610ee2e9920803cbc14704e2f46eebfbbeb8c7df03dc3dc5ce1e
|
Provenance
The following attestation bundles were made for httpx_system_certs-1.0.0.tar.gz:
Publisher:
test_and_release.yml on Baltoch/httpx-system-certs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
httpx_system_certs-1.0.0.tar.gz -
Subject digest:
051293d9cd88683cc6ce660be1888803f075dc464e51f98114b355a8ffbc2c33 - Sigstore transparency entry: 348920029
- Sigstore integration time:
-
Permalink:
Baltoch/httpx-system-certs@b18c3dade8d0db409e5174c559b97507f9157935 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Baltoch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_release.yml@b18c3dade8d0db409e5174c559b97507f9157935 -
Trigger Event:
push
-
Statement type:
File details
Details for the file httpx_system_certs-1.0.0-py3-none-any.whl.
File metadata
- Download URL: httpx_system_certs-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dccdc7d26b9637f9f21ecc58e03ee168ba7ce5b1eb6e5a1df8efcc920ef30fd3
|
|
| MD5 |
83beabfc3c9029be6ef184bfc370d0ca
|
|
| BLAKE2b-256 |
e1c8d6cc42b2eeae151aad201d16f22951dfdbd0976e8b1f0e4d3fddafbc6425
|
Provenance
The following attestation bundles were made for httpx_system_certs-1.0.0-py3-none-any.whl:
Publisher:
test_and_release.yml on Baltoch/httpx-system-certs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
httpx_system_certs-1.0.0-py3-none-any.whl -
Subject digest:
dccdc7d26b9637f9f21ecc58e03ee168ba7ce5b1eb6e5a1df8efcc920ef30fd3 - Sigstore transparency entry: 348920067
- Sigstore integration time:
-
Permalink:
Baltoch/httpx-system-certs@b18c3dade8d0db409e5174c559b97507f9157935 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Baltoch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_release.yml@b18c3dade8d0db409e5174c559b97507f9157935 -
Trigger Event:
push
-
Statement type: