Skip to main content

Gufo ACME

Gufo ACME is a Python asyncio client for the ACME protocol.

PyPi version Downloads Python Versions Discord License Build codecov Sponsors Ruff

Documentation: https://docs.gufolabs.com/gufo_acme/

Source Code: https://github.com/gufolabs/gufo_acme/


The Automatic Certificate Management Environment (ACME) protocol defines a method for automated certificate signing, now widely used by services such as Let's Encrypt. Gufo ACME is a Python asyncio ACME client library that simplifies the protocol complexity with a straightforward and robust API.

Gufo ACME contains various clients which can be applied to your tasks:

  • AcmeClient - base client to implement any fulfillment functionality by creating subclasses.
  • DavAcmeClient - http-01 fulfillment using WebDAV methods.
  • PowerDnsAcmeClient - dns-01 PowerDNS fulfillment.
  • WebAcmeClient - http-01 static file fulfillment.

Supported Certificate Authorities

Examples

Account Creation

Create an account and store state to the file.

client_key = AcmeClient.get_key()
async with AcmeClient(DIRECTORY, key=client_key) as client:
    await client.new_account(email)
    state = client.get_state()
with open(client_state_path, "wb") as fp:
    fp.write(state)

Private Key Generation

To generate a private key in PEM format.

private_key = AcmeClient.get_domain_private_key()

Generate CSR

To generate a certificate signing request.

csr = AcmeClient.get_domain_csr(domain, private_key)

Sign Certificate

Sign the certificate using http-01 challenge:

CHALLENGE_DIR = "/www/acme/"


class SignAcmeClient(AcmeClient):
    async def fulfill_http_01(
        self, domain: str, challenge: AcmeChallenge
    ) -> bool:
        v = self.get_key_authorization(challenge)
        with open(os.path.join(CHALLENGE_DIR, challenge.token), "wb") as fp:
            fp.write(v)
        return True

    async def clear_http_01(
        self: AcmeClient, domain: str, challenge: AcmeChallenge
    ) -> None:
        os.unlink(os.path.join(CHALLENGE_DIR, challenge.token))

    ...
async with SignAcmeClient.from_state(state) as client:
    cert = await client.sign(domain, csr)

Features

  • Pure-Python implementation.
  • Asynchronous.
  • Fully typed.
  • Clean API.
  • Built with security in mind.
  • Robust well-tested code.
  • Batteries included.
  • 99%+ test coverage.

On Gufo Stack

This product is a part of Gufo Stack - the collaborative effort led by Gufo Labs. Our goal is to create a robust and flexible set of tools to create network management software and automate routine administration tasks.

To do this, we extract the key technologies that have proven themselves in the NOC and bring them as separate packages. Then we work on API, performance tuning, documentation, and testing. The NOC uses the final result as the external dependencies.

Gufo Stack makes the NOC better, and this is our primary task. But other products can benefit from Gufo Stack too. So we believe that our effort will make the other network management products better.

Metadata

Release files for gufo-acme 0.7.0

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

Source distribution (sdist)

Source distribution for gufo-acme 0.7.0
File Size Uploaded
gufo_acme-0.7.0.tar.gz 23.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gufo-acme 0.7.0
File Interpreter ABI Platform
gufo_acme-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.2 kB

Release files / gufo_acme-0.7.0.tar.gz

Download URL gufo_acme-0.7.0.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
62526c31c275b94eaa6df15f97c7fafe072874f47d32ac18d05287b6ba062d34
BLAKE2b-256 checksum
How to use checksums
bdf33c0ed21e200598a03eda1ea98c7d16584b38d8ed72a67836a870748f5ea6
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 8, 2026.

Transparency log

Release files / gufo_acme-0.7.0-py3-none-any.whl

Download URL gufo_acme-0.7.0-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18cc381a25326a99a10d9af8a30c4ffadd962789b0dfd42864c1d3bf51649d86
BLAKE2b-256 checksum
How to use checksums
6d09abb6df8b67c8543aed8a5e727b3f7bcc23a73efcf2abac1ec2884cd1582f
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release 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