python-certifi README

The project's README from github.com/certifi/python-certifi. As one markdown file: README.md.

Certifi: Python SSL Certificates

Certifi provides Mozilla's carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. It has been extracted from the Requests_ project.

Installation

certifi is available on PyPI. Simply install it with pip::

$ pip install certifi

Usage

To reference the installed certificate authority (CA) bundle, you can use the built-in function::

>>> import certifi

>>> certifi.where()
'/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'

Or from the command line::

$ python -m certifi
/usr/local/lib/python3.7/site-packages/certifi/cacert.pem

Enjoy!

.. _Requests: https://requests.readthedocs.io/en/latest/

Addition/Removal of Certificates

Certifi does not support any addition/removal or other modification of the CA trust store content. This project is intended to provide a reliable and highly portable root of trust to python deployments. Look to upstream projects for methods to use alternate trust.

python-certifi (certifi/python-certifi)

Searching Database…

What is this?Certifi is a Python package that ships Mozilla's curated collection of Root CA certificates, used to validate the trustworthiness of SSL certificates and verify the identity of TLS hosts.
Is this a library I import, or a standalone tool?It's a Python library distributed on PyPI; you import it in code to get the path to a CA bundle, though it also exposes a small command-line entry point.
How do I install and use it?Install with 'pip install certifi', then call certifi.where() in Python to get the path to the CA bundle, or run 'python -m certifi' from the command line to print that path.
Can I add or remove certificates from the bundle myself?No, Certifi doesn't support modifying its trust store content; it's meant to be a fixed, portable root of trust, so you'd need an upstream project for custom trust configurations.
Where do the root certificates come from?They are Mozilla's own curated set of trusted Root Certificates, repackaged for easy use in Python.
Why was Certifi split out as its own project?It was originally extracted from the Requests library so other Python projects could depend on a reliable, portable CA bundle without pulling in all of Requests.
What does certifi.where() actually return?It returns the filesystem path to the installed cacert.pem bundle, e.g. '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem', which you can pass to TLS libraries that need a CA file.
What are similar projects?certbot, requests, acme.sh, openssl, httpx, seaborn, playport, apsw
Creator
certifi
Size
1.4 MB
Stars
1K
Updated
CommitNov 20
Age
14y
Commits · 90 Days