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.7

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.7
File Size Uploaded Provenance Actions
certmate_sdk-0.1.7.tar.gz 11.8 kB With provenance Details for certmate_sdk-0.1.7.tar.gz

Built distribution (wheel)

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

Total release size: 24.5 kB

Release files / certmate_sdk-0.1.7.tar.gz

Download URL certmate_sdk-0.1.7.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4a354ebde69f4ca70a6080a1e58523f9b35b7c7c09798bb00fa98bae341905a6
BLAKE2b-256 checksum
How to use checksums
5398059d59071c10cb160418813e4bae01fe1459e61bbf50615b7ff829c5306b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.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.

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 Nov 25, 2026.

Transparency log

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

Download URL certmate_sdk-0.1.7-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39ec957e550e42f9a15d166787cbebd033a970bfd419494a8f7d59e436ab7f29
BLAKE2b-256 checksum
How to use checksums
678e17e50820ded27a31e9cd3a73634bf71daa6b5644abef0f10c354c2f8e0fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.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.

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 Nov 25, 2026.

Transparency log

Security for certmate-sdk 0.1.7

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.7.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 Nov 25, 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