Skip to main content

certmate-sdk

A thin, dependency-light Python client for the CertMate REST API.

from certmate import Client

with Client("https://certmate.example.com", token="...") as c:
    job = c.create_certificate("app.example.com", dns_provider="cloudflare", wait=True)
    for cert in c.list_certificates():
        print(cert.domain, cert.days_until_expiry, cert.has_expired())
    print(c.audit_verify()["ok"])

base_url/token fall back to CERTMATE_URL / CERTMATE_TOKEN. The only runtime dependency is httpx — no server code, no certbot.

Where a certificate is served

cert.domain is the certificate's name, which every call about it takes. cert.host is where it is served: the address of an IP certificate (also in cert.ip_address), the host a certificate named apart from its domain is for, and its name otherwise. Both are None against a server before API contract 2.59.

A second certificate for a domain

c.create_certificate("example.com", name="internal.example.com") issues a certificate for example.com named internal.example.com, which every later call takes. It needs API contract 2.61, and the client asks the server first: an older server would ignore the name and issue the certificate under its domain, so the call raises UnsupportedByServer and sends nothing. c.api_contract_version() says what the server reports, and c.require_contract("2.61", "name") makes the same check on its own.

Asking whether a certificate has expired

Use cert.has_expired(), not cert.days_until_expiry <= 0.

days_until_expiry is a whole number of days and rounds down, so a certificate with 23 hours of life left reports 0, and that comparison calls it expired. CertMate's own dashboard did exactly that until server 2.32.2, and on a private CA it was every certificate: step-ca issues 24-hour certificates by default.

has_expired() returns the server's own answer on API contract 2.2 and later (cert.expired, with cert.seconds_left beside it for the real remaining life). Against an older server it returns what a day count can honestly support: True below zero, False above it, and None on exactly zero, which is the one day the number cannot tell apart. None also means the server could not parse the certificate, which is neither expired nor fine.

Metadata

Release files for certmate-sdk 0.1.6

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

Source distribution (sdist)

Source distribution for certmate-sdk 0.1.6
File Size Uploaded Provenance Actions
certmate_sdk-0.1.6.tar.gz 11.8 kB With provenance Details for certmate_sdk-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for certmate-sdk 0.1.6
File Interpreter ABI Platform Actions
certmate_sdk-0.1.6-py3-none-any.whl Python 3 none any Details for certmate_sdk-0.1.6-py3-none-any.whl

Total release size: 24.5 kB

Release files / certmate_sdk-0.1.6.tar.gz

Download URL certmate_sdk-0.1.6.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6832a6c8a25b128ce16d95466c591518b64e1c42b41e9e98a328363f23832ecb
BLAKE2b-256 checksum
How to use checksums
82a7df570eafbfd83c7d8ea888a479a3afe9b9e01c4f8015f6b44b454557dcff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / certmate_sdk-0.1.6-py3-none-any.whl

Download URL certmate_sdk-0.1.6-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2722fd82f387c5b98a9bac0902249c7cba79f55bf5f6aa32e643c5db071998f
BLAKE2b-256 checksum
How to use checksums
f9c875ba732af65ba772df997909e2da9ffbb7073da6e5a079e0d68c3d76febf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for certmate-sdk 0.1.6

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for certmate_sdk-0.1.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

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.

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