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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

certapi-1.1.16.tar.gz (75.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

certapi-1.1.16-py3-none-any.whl (66.7 kB view details)

Uploaded Python 3

File details

Details for the file certapi-1.1.16.tar.gz.

File metadata

  • Download URL: certapi-1.1.16.tar.gz
  • Upload date:
  • Size: 75.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.21

File hashes

Hashes for certapi-1.1.16.tar.gz
Algorithm Hash digest
SHA256 52948287ba932df73d317b3acca223a20080fd6048ac86bc5873e91761d655ff
MD5 40dfe094b407b0aa98f8a2d4c1622acd
BLAKE2b-256 24883d62e0ae75d79d0341de99c97a77a58bd6a673d9460fa685d75c3a853980

See more details on using hashes here.

File details

Details for the file certapi-1.1.16-py3-none-any.whl.

File metadata

  • Download URL: certapi-1.1.16-py3-none-any.whl
  • Upload date:
  • Size: 66.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.21

File hashes

Hashes for certapi-1.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 d28193ff92ee8f85ff470617bbb8d2540e38836248cb3978b7a46e28f41beb29
MD5 249d0b6516725eee69506eec30514e1d
BLAKE2b-256 356478c5b4ae9cc850fd0de5a10c836e8a0830cc024011ca5bf4113ae778cca7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.16 This release

2 files

1.1.15

2 files

1.1.14

2 files

1.1.13

2 files

1.1.12

2 files

1.1.11

2 files

1.1.10

2 files

1.1.9

2 files

1.1.8

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

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