Skip to main content

Freenom DNS API

Project description

Freenom-dns Script

An unofficial python implementation for managing freenom.com dns records.

Freenom

Freenom is the world's first and only free domain provider.

Install

pip install git+https://github.com/Shm013/freenom-dns.git

How to use

from freenom import Freenom

if __name__ == '__main__':
    freenom = Freenom('your username', 'your password')
    ###################################################
    pub_ip = freenom.getPublicIP()

    # add or modify a record
    freenom.setRecord('your domain', '', 'a', pub_ip)
    freenom.setRecord('your domain', 'www', 'a', pub_ip)
    freenom.setRecord('your domain', 'test', 'a', pub_ip)

    # delete a record
    freenom.delRecord('your domain', 'test')

    # show all records with domain
    freenom.showRecords('your domain')

print results

doLogin: Login successfully.
PublicIP: xxx.xxx.xxx.xxx
setRecord: There were no changes
setRecord: There were no changes
setRecord: Record added successfully
delRecord: Record deleted successfully
--------------your domain--------------
['', 'A', '3600', 'xxx.xxx.xxx.xxx']
['WWW', 'A', '3600', 'xxx.xxx.xxx.xxx']

License

MIT

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

freenom-0.0.2.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

freenom-0.0.2-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

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