Metadata-Version: 2.1
Name: namecom
Version: 0.3.0
Summary: Python SDK for name.com
Home-page: https://github.com/fzlee/namecom
Author: fzlee
Author-email: hi@ifconfiger.com
License: UNKNOWN
Project-URL: Bug Reports, https://github.com/fzlee/namecom/issues
Project-URL: Source, https://github.com/fzlee/namecom/
Keywords: name.com v4 sdk
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: click
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: check-manifest ; extra == 'dev'
Provides-Extra: test
Requires-Dist: coverage ; extra == 'test'

## Python sdk for name.com v4 api


#### Installation
```
pip install namecom --upgrade
``` 


#### Command line guide

If you do not want to append --name and --token to the command every time, run the following command should do some help
```bash
export NAMECOM_NAME=<your namecom account>
export NAMECOM_TOKEN=<your namecom token>
```


To create a dns record
```bash
namecli create_dns 
    --domain example.org
    --host www
    --dns_type A
    --answer 127.0.0.1
    --name <your namecom account>
    --token <your namecom token>
```

To delete a DNS record
```bash
namecli delete_dns 
    --domain example.org
    --host www
    --name <your namecom account>
    --token <your namecom token>
```


#### SDK development

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

Initialization
```python
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")
```

#### DDNS usage
```bash
python ddns.py 
    --domain example.org
    --host www
    --username <your namecom account>
    --token <your namecom token>
```

