ddnspod

ddnspod


License
MIT
Install
pip install ddnspod==0.1.2

Documentation

DDNSPod

Requirements Status

pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*

example

# get domain_id and record_id
# curl -X POST https://dnsapi.cn/Domain.List -d 'login_token=LOGIN_TOKEN&format=json'
# curl -X POST https://dnsapi.cn/Record.List -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346'

from ddnspod.ddns import Ddns


if __name__ == '__main__':
    token_id = '12345'
    token = 'ec589ccfa8jk4b1241d3e63b7690b53b'
    domain_id = 37642234
    record_id = 18292123

    d = Ddns('{},{}'.format(token_id, token), domain_id, record_id, 'dev')
    # checker for ip update every 10 seconds
    d.checker(10)