Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A python library to interact with the name.com api.

Project description

PyPI Build Status codecov Requirements Status

pynamedotcom

A python library to interact with the name.com api

Installation

$ pip install pynamedotcom

API Usage

>>> # read authentication details
...
>>> import json
>>> with open("tests/auth.json") as f:
...     auth = json.load(f)
...
>>> # initialise api
...
>>> import pynamedotcom
>>> host = "api.dev.name.com"
>>> # get domains
...
>>> with pynamedotcom.API(host=host, **auth) as api:
...     for domain_name in api.domains:
...         print(domain_name)
...
wolcomm.net
maddison.family
>>>
>>> # fetch domain object
...
>>> with pynamedotcom.API(host=host, **auth) as api:
...     domain = api.domain(name="maddison.family")
...
>>> domain
Domain(maddison.family)
>>>
>>> # get/set domain properties
...
>>> domain.name
u'maddison.family'
>>> domain.nameservers
[u'ns1.example.com', u'ns2.example.com']
>>> domain.nameservers = ['foo.example.org', 'bar.example.org']
>>> domain.nameservers
[u'foo.example.org', u'bar.example.org']

CLI Usage

See namedotcom --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pynamedotcom, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pynamedotcom-0.1.1-py2.py3-none-any.whl (12.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size pynamedotcom-0.1.1.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page