Skip to main content

Live patches pip to use system certs by default

Project description

This package patches pip and requests at runtime to use certificates from the default system store (rather than the bundled certs ca).

This will allow pip to verify tls/ssl connections to servers who’s cert is trusted by your system install.

Simply install with:

pip install pip_system_certs

and pip should trust your https sites if your host os does.

This also extends to all direct uses of the requests library (and other packages that use requests)

PyInstaller

The method used to automatically enable the cert handling in requests/pip/etc relies on a .pth file script that python loads at startup. This method does not work when a python application is bundled into an executable with PyInstaller (or similar).

If you want to use this tool in an application built with PyInstaller it will need to be manually enabled in your application.

This can be done by adding the following line to the top of your main application script:

import pip_system_certs.wrapt_requests

This must be run before requests is imported.

Acknowledgements

The method of patching at runtime is built from the autowrapt module: https://pypi.python.org/pypi/autowrapt

version: 3.4

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pip_system_certs-3.6.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file pip_system_certs-3.6.tar.gz.

File metadata

  • Download URL: pip_system_certs-3.6.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for pip_system_certs-3.6.tar.gz
Algorithm Hash digest
SHA256 5c14157bf37d67a096b19b3c3ed14c7b0ed8a057072eb90c5baf97fd809e631d
MD5 7fbf253f7bed8334e04d77d06ee821a5
BLAKE2b-256 63187f6e23dd70f8864715e433d60be62e41f115e625813afafc149759c8e357

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page