fzlee / namecom

Simple ddns module for name.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python sdk for name.com v4 api

Installation

pip install namecom --upgrade

Command line guidance

If you do not want to append --name and --token to the command every time, run the following command should do some help

export NAMECOM_NAME=<your namecom username>
export NAMECOM_TOKEN=<your namecom token>

To delete a DNS record

namecli create-dns 
    --domain example.org
    --host www
    --dns-type A
    --answer 127.0.0.1
    --name <your namecom username>
    --token <your namecom token>

To delete a DNS record

namecli delete-dns 
    --domain example.org
    --host www
    --name <your namecom username>
    --token <your namecom token>

To create a DDNS record

namecli ddns 
    --domain example.org
    --host www
    --name <your namecom username>
    --token <your namecom token>

SDK development

So far, not all name.com api are supported.

Initialization

from namecom import Name
name = Name(name, token)
name.list_records("example.org", page=1, perPage=1000)
name.delete_record("example.org", id_="12345", )
name.create_record("example.org", "www", "A", "127.0.0.1")

About

Simple ddns module for name.com

License:MIT License


Languages

Language:Python 100.0%