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 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).subject_alt_names("DNS:app.127.0.0.1.nip.io")
cred.write_certificates_as_pem("cert.pem")
cred.write_private_key_as_pem("key.pem")

Documentation

Documentation is available here.

Installation

You can 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.1.4.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

certy-0.1.4-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for certy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 53e3549db8c706c316dd0c30fb55b25d5026dbe635d538f963eaffe43e1a2ad5
MD5 e7d6e6d2af926312a657c94278b6e75d
BLAKE2b-256 316da238680e30e70372f353a73d68bacdfd5c88345bdaa57ca2b8766538fe68

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for certy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bdbb37dad7b1147622825f5a4b01615e68814d0e6f3d4f7803ede7a6b5b651ac
MD5 ee9d228dc30de6ced155a62f6efda94b
BLAKE2b-256 d25f0bca2666d099806a1948854d0dbb2109bad6208232dbc4011c2943b7c983

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