Skip to main content

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

Project description

Freenom-dns Script v2.0.0

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 freenom-dns

How to use

Instantiate an object

from freenom_dns import Freenom

your_username = 'your username'
your_password = 'your password'
your_domain = 'your domain'
freenom = Freenom(your_username, your_password)

Show All Domains

freenom.show_domains()

Show All Records

freenom.show_records(your_domain)

Add One Record

# add '' record name with public ip
freenom.add_record(your_domain)
# add 'www' record name with public ip
freenom.add_record(your_domain, 'www')
freenom.add_record(your_domain, 'www', '192.168.1.1')
freenom.add_record(your_domain, '_dnsauth', type='txt', ttl='3000', target='33333333')

Modify One Record (if the record exists then modify)

# modify '' record name with public ip
freenom.modify_record(your_domain)
# modify 'www' record name with public ip
freenom.modify_record(your_domain, 'www')
freenom.modify_record(your_domain, 'www', '192.168.2.2')
freenom.modify_record(your_domain, '_dnsauth', ttl='2800', target='88888888')

Set One Record (Add or Modify)

freenom.set_record(your_domain, 'my')
freenom.set_record(your_domain, 'my', '0.0.0.0')

Set Record List (Beta)

"""
record_list:
{name}: *required!!!
{type}: default: A
{ttl}: default: 3600
{target}: default: your Public IP
"""
record_list = [
    {'name': ''},
    {'name': 'www', 'target': '100.100.100.100'},
    {'name': '_dnsauth', 'type': 'txt', 'ttl': '2800', 'target': '22222222'}]
freenom.set_record_list(your_domain, record_list)

Delete One Record

freenom.del_record(your_domain, 'www')

Clear All Record (Beta)

freenom.clear_record(your_domain)

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_dns-2.0.0b0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freenom_dns-2.0.0b0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file freenom_dns-2.0.0b0.tar.gz.

File metadata

  • Download URL: freenom_dns-2.0.0b0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

File hashes

Hashes for freenom_dns-2.0.0b0.tar.gz
Algorithm Hash digest
SHA256 43742d50e5edafa445a2ffa641dd79ee3420decce56b499b1037a0a1494b65eb
MD5 fd0509ff8d17d4f9b90c7b61a276cd3a
BLAKE2b-256 920b23102a845ca900f52a18f24d1bc76e0600dd6964f148688b323e71ff64e9

See more details on using hashes here.

File details

Details for the file freenom_dns-2.0.0b0-py3-none-any.whl.

File metadata

  • Download URL: freenom_dns-2.0.0b0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

File hashes

Hashes for freenom_dns-2.0.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 37cb59224a5988495f0dc6e26f455548d01292ee72b9f3655538e183b3c556ab
MD5 37df9273c13b72611cb9761a361f0cd6
BLAKE2b-256 cf079dd7471974eb39df4f73a5ee73409e76084c84c399269b973d187857796d

See more details on using hashes here.

Supported by

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