Skip to main content

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

Project description

Freenom-dns Script v2.x

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.1.tar.gz (8.5 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.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file freenom_dns-2.0.1.tar.gz.

File metadata

  • Download URL: freenom_dns-2.0.1.tar.gz
  • Upload date:
  • Size: 8.5 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.1.tar.gz
Algorithm Hash digest
SHA256 51681f0f61e95dd18efd830dee7af6a751abc5d97e5ae774b6e14857abddb8d1
MD5 1c3f738374a3c86139037659aa2bc6fe
BLAKE2b-256 a5f4cbe1db2857821e2a6b8b324fe057d19ed4825357637608bd3e9e2d4fed25

See more details on using hashes here.

File details

Details for the file freenom_dns-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: freenom_dns-2.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f6b30bdd01ad9fca282b9ab4767dc8fff882db4f116ff738491762857651473
MD5 ab31c7addad8c65bd3fb7792877175c1
BLAKE2b-256 fe230a571957091a3638383a81b8cf5fc1c8c66e4169745c7513db4d1883d647

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