- Notifications
You must be signed in to change notification settings - Fork2
Python library to handle acme-dns client communication and persistent account storage.
License
NotificationsYou must be signed in to change notification settings
joohoi/pyacmedns
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A client library to handleacme-dns client communication and persistent account storage.
Install from PyPI
$ pip install pyacmedns
The following is a complete example of handling the validation using this library.
#!/usr/bin/env pythonfrompyacmednsimportClient,Storagewhitelisted_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 domainaccount=storage.fetch("your.example.org")ifnotaccount:# Account did not exist. Let's create a new one# The whitelisted networks parameter is optionalaccount=client.register_account(whitelisted_networks)# Save itstorage.put(domain,account)storage.save()# Update the acme-dns TXT record.client.update_txt_record(account,"___validation_token_recieved_from_the_ca___")
About
Python library to handle acme-dns client communication and persistent account storage.
Resources
License
Stars
Watchers
Forks
Packages0
No packages published