Sync Client¶
lacme.sync ¶
Synchronous wrapper around the async :class:~lacme.client.Client.
Provides :class:SyncClient, a blocking interface that delegates every
operation to the async Client through a managed event loop.
SyncChallengeHandler ¶
Bases: Protocol
Synchronous protocol for ACME challenge provisioning and cleanup.
SyncChallengeMap ¶
Bases: Protocol
Read-only per-identifier sync/async challenge-handler overrides.
items ¶
Iterate over identifier challenge overrides.
SyncClient ¶
Synchronous ACME v2 client.
Wraps the async :class:~lacme.client.Client and exposes every public
method as a blocking call. An injected HTTP client must be a fresh,
unused :class:httpx2.AsyncClient. Ownership transfers to SyncClient
so the client can be closed on the managed event loop before that loop is
shut down.
Usage::
with SyncClient(directory_url="...", account_key=key) as client:
cert = client.issue(["example.com"])
check_rate_limits ¶
Check registered-domain limits, excluding typed IP addresses.
create_account ¶
create_account(*, contact: list[str] | None = None, terms_of_service_agreed: bool = True, only_return_existing: bool = False, eab_kid: str | None = None, eab_hmac_key: str | None = None) -> Account
Create or find an existing ACME account.
create_authorization ¶
create_authorization(identifier_value: str, *, identifier_type: IdentifierType = IdentifierType.DNS) -> Authorization
Create a pre-authorization for an identifier.
create_order ¶
create_order(domains: IdentifierValue | Sequence[IdentifierValue], *, not_before: str | None = None, not_after: str | None = None) -> Order
Create a new certificate order for DNS names and/or typed IP addresses.
download_certificate ¶
Download the certificate chain via POST-as-GET.
finalize_order ¶
Submit the CSR to finalize the order.
get_authorization ¶
Fetch an authorization via POST-as-GET.
get_authorizations ¶
Fetch all authorizations for an order.
issue ¶
issue(domains: IdentifierValue | Sequence[IdentifierValue], *, challenge_type: str = 'http-01', challenge_map: SyncChallengeMap | None = None) -> CertBundle
Issue for DNS names or typed IPs, adapting synchronous mapped handlers.
poll_authorization ¶
Poll an authorization until it reaches a terminal state.
poll_order ¶
Poll an order until it reaches a terminal state.
respond_to_challenge ¶
Signal readiness for challenge validation.
revoke ¶
Revoke a certificate using the account key.
revoke_with_cert_key ¶
revoke_with_cert_key(cert_pem: bytes | str, cert_key: EllipticCurvePrivateKey, *, reason: int | None = None) -> None
Revoke a certificate using its own key pair.
rollover_key ¶
Roll over the account key.