Skip to main content

CertApi

Certapi talks with DNS provider and ACME to issue SSL certificates and save it to a keystore.

CertApi is a base library for building other tools, or to integrate Certificate creation feature in your app. CertAPI also provides HTTP api server and can be deployed using Docker

Build Status codecov PyPI version

Why another library?

I designed this library so that it can be imported and plugged in to other python projects. Goal is not to provide CLIs or quick working demo, but to be versatile for any use case.

  • Pluggable keystores for keys and certificates
  • Pluggable Challenge solvers for DNS and Http challenge solving
  • High-level manager with renewal checks and multi-solver support
  • Same interface for working locally, or requesting certificate from certapi server.

See the developer guide in Developer.md for library usage and workflows.

Installation

You can install CertApi using pip

pip install certapi

CLI

CertApi also ships with a CLI for quick verification and certificate issuance.

## Certapi's dependencies are already included in the python installation. This doesn't affect the system.
sudo python3 -m pip install certapi --break-system-packages

1. With HTTP Challenge

HTTP challenge requires you to have seup the DNS correctly. The ACME server will verify your domain by making an HTTP request.

# Verify environment and HTTP routing
sudo certapi verify example.com www.example.com

# Obtain a certificate (requires root for HTTP-01)
sudo certapi obtain example.com www.example.com

2. With DNS Provider Key

Using DNS-01 challenge with Cloudflare doesn't require the DNS to be setup. Set your Cloudflare API key as an environment variable.

# Set Cloudflare API key or token
export CLOUDFLARE_API_KEY=...   # or CLOUDFLARE_API_TOKEN

# Verify DNS configuration
sudo certapi verify example.com

# Obtain a certificate using DNS-01
sudo certapi obtain example.com www.example.com

Metadata

Release files for certapi 1.1.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for certapi 1.1.16
File Size Uploaded Provenance
certapi-1.1.16.tar.gz 75.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for certapi 1.1.16
File Interpreter ABI Platform
certapi-1.1.16-py3-none-any.whl Python 3 none any Details

Total release size: 142.3 kB

Release files / certapi-1.1.16.tar.gz

Download URL certapi-1.1.16.tar.gz
Size 75.6 kB
Tags Source
SHA-256 checksum
How to use checksums
52948287ba932df73d317b3acca223a20080fd6048ac86bc5873e91761d655ff
BLAKE2b-256 checksum
How to use checksums
24883d62e0ae75d79d0341de99c97a77a58bd6a673d9460fa685d75c3a853980
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / certapi-1.1.16-py3-none-any.whl

Download URL certapi-1.1.16-py3-none-any.whl
Size 66.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d28193ff92ee8f85ff470617bbb8d2540e38836248cb3978b7a46e28f41beb29
BLAKE2b-256 checksum
How to use checksums
356478c5b4ae9cc850fd0de5a10c836e8a0830cc024011ca5bf4113ae778cca7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Security for certapi 1.1.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.16 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page