Certy is a simple X509 certificate generator for unit and integration tests.
Project description
python-certy
Description
Certy provides a simple API for creating X509 certificates and certificate revocation lists on demand when running unit tests. No more storing test certificates and private keys in the repository!
Python-certy is a version of similar tool for command line and Golang called certyaml and java-certy for Java.
Example
from certy import Credential
ca = Credential().subject("CN=ca")
ca.write_certificates_as_pem("ca.pem")
cred = Credential().subject("CN=server").issuer(ca)
cred.write_certificates_as_pem("cert.pem")
cred.write_private_key_as_pem("key.pem")
Documentation
The latest documentation is available here. See also tests for more examples.
Installation
Install certy from PyPI:
pip install certy
Development
Create virtual environment by running python3 -m venv .venv, then activate it source .venv/bin/activate.
Install dependencies by running pip install -r dev-requirements.txt.
Run tests with pytest.
To build wheel, run flit build and check the generated wheel in dist directory.
To find out coverage of tests, execute coverage run -m pytest and then coverage html.
The coverage report is generated to htmlcov/index.html.
Run make html on docs directory to generate documentation.
Open docs/_build/html/index.html to view the generated documentation.
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
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 certy-0.2.2.tar.gz.
File metadata
- Download URL: certy-0.2.2.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaa86574c4dc7f9e1dc5e7d7929f25cb1263c91542609f5f62c4f7541e5e7e8c
|
|
| MD5 |
af36702bc9eb3567967c2b5847f5cd7f
|
|
| BLAKE2b-256 |
9a86e07d5b26baca239020a60acec8116ac6cf8a9acefed497b65a048cda540b
|
File details
Details for the file certy-0.2.2-py3-none-any.whl.
File metadata
- Download URL: certy-0.2.2-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b4109c073ccfefd13910462b29a23991e80bbd995b1c45dc5db52c607e6fd62
|
|
| MD5 |
87a5910063c5bf0ebc47c4cea966a3c9
|
|
| BLAKE2b-256 |
ca9015099c0b00f1de46b6b723212fb71d7e9e6c3c2b804b6d435fca0f3f1514
|