Skip to main content

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 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

certy-0.2.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

certy-0.2.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file certy-0.2.0.tar.gz.

File metadata

  • Download URL: certy-0.2.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for certy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b66a6365c300b1a8fe842fed8616599060262fe15a7fcd6b49e80c1a1fe259dd
MD5 39d35eaec4808d8333ba3d9a474916c9
BLAKE2b-256 834e271badd633146131b4389d71eb87104be0e26be23b326170697918acad47

See more details on using hashes here.

File details

Details for the file certy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: certy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for certy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f376604d1a83ce07c0587b341f4f66a48cba7bc64a69d2eff33e8878334763f
MD5 ffd1cf1210330f9f45393228af401353
BLAKE2b-256 3b2c5b9fa685b58851e6777d109c24a227c85bac7863b94c14d2857d6c80b5c2

See more details on using hashes here.

Supported by

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