Skip to main content

Library that implements the acme-dns client communication and persistent account storage on the client host

Project description

A client library to handle acme-dns client communication and persistent account storage.

Installation

Install from PyPI

$ pip install pyacmedns

Usage

The following is a complete example of handling the validation using this library.

#!/usr/bin/env python

from pyacmedns import Client, Storage

whitelisted_networks = ["192.168.11.0/24", "[::1]/128"]
domain = "your.example.org"

# Initialize the client. Point it towards your acme-dns instance.
client = Client("https://auth.acme-dns.io")
# Initialize the storage. If the file does not exist, it will be
# automatically created.
storage = Storage("/path/to/storage.json")

# Check if credentials were previously saved for your domain
account = storage.fetch("your.example.org")
if not account:
    # Account did not exist. Let's create a new one
    # The whitelisted networks parameter is optional
    account = client.register_account(whitelisted_networks)
    # Save it
    storage.put(domain, account)
    storage.save()

# Update the acme-dns TXT record.
client.update_txt_record(account, "___validation_token_recieved_from_the_ca___")

Project details


Download files

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

Source Distribution

pyacmedns-0.4.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file pyacmedns-0.4.tar.gz.

File metadata

  • Download URL: pyacmedns-0.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyacmedns-0.4.tar.gz
Algorithm Hash digest
SHA256 c609c301deb045045b2eb7749f3f306900d579c3bf304dccdd969dcf016281c3
MD5 c997dee9aa077b05020955f5ddc46ca6
BLAKE2b-256 a87ffae68cdf1af35aead9a5189a735a373bac3d03a3155b976678c1f420ad03

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page