Certipie: a little companion for your certificate operations

Image of official school documents
Photo by Liam Truong on Unsplash


The minimal python version supported is python3.9. You can install the project using pip:

$ pip install certipie


There are three ways to used certipie that we will see below.

The command line interface

Certipie comes with a neat command line interface (cli) cert. In fact, if you just want to use the command line, you can use pipx to install it.

$ pipx install certipie
$ cert
Usage: cert [OPTIONS] COMMAND [ARGS]...

A cli to generate certificate signing request and self-signed certificate
that can be used for testing purpose.

--version Show the version and exit.
-h, --help Show this message and exit.

auto-cert Creates a self-signed certificate useful for tests.
csr Creates a certificate signing request file given...
install-completion Install completion script for bash, zsh and fish...
rsa Creates a pair of private/public keys using the RSA...
server Serves a swagger UI where you can perform the same...
$ cert install-completion
$ cert csr -f csr.pem
Organization: orga
State: Ile-de-France
Country: FR
City: Paris
Name: site.com
The certificate signing request has been successfully created in /home/kevin/...
  • To help us create a certificate signing request, the command prompts various necessary information that the certificate authority needs.
  • The name information represents the main domain name you want to submit in your request.
  • If you want to cover many domain names, use the option alt-names with a list of domains separated by commas.
  • Don’t hesitate to read the command documentation with -h option or read the project documentation for more information.
$ cert auto-cert -f cert.pem --validity=360
Organization: orga
State: Ile-de-France
Country: FR
City: Paris
The self-signed certificate has been successfully created in /home/kevin/...


The cert cli has a server command which displays a Swagger UI. This way non-technical users can leverage certipie.

$ cert server
Screenshot of the swagger ui displayed by the server command
Swagger UI displayed by the server
An snippet code showing how to customize the certipie rest api
An example of api customization

Certipie api

The last way to use certipie is to use the functions it includes. These are the same functions used by the rest api or command line interface. Here is a snippet to create a certificate signing request.

Creation of csr using certipie api



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kevin Tewouda

Kevin Tewouda


Déserteur camerounais résidant désormais en France. Passionné de programmation, sport, de cinéma et mangas. J’écris en français et en anglais dû à mes origines.