No project description provided
Project description
.. raw:: html
<!--description: A python library to interact with the name.com api. -->
|PyPI| |Build Status| |codecov| |Requirements Status|
pynamedotcom
============
A python library to interact with the name.com api
Installation
------------
.. code:: bash
$ pip install pynamedotcom
API Usage
---------
.. code:: python
>>> # 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``
.. |PyPI| image:: https://img.shields.io/pypi/v/pynamedotcom.svg
:target: https://pypi.python.org/pypi/pynamedotcom
.. |Build Status| image:: https://travis-ci.org/benmaddison/pynamedotcom.svg?branch=master
:target: https://travis-ci.org/benmaddison/pynamedotcom
.. |codecov| image:: https://codecov.io/gh/benmaddison/pynamedotcom/branch/master/graph/badge.svg
:target: https://codecov.io/gh/benmaddison/pynamedotcom
.. |Requirements Status| image:: https://requires.io/github/benmaddison/pynamedotcom/requirements.svg?branch=master
:target: https://requires.io/github/benmaddison/pynamedotcom/requirements/?branch=master
<!--description: A python library to interact with the name.com api. -->
|PyPI| |Build Status| |codecov| |Requirements Status|
pynamedotcom
============
A python library to interact with the name.com api
Installation
------------
.. code:: bash
$ pip install pynamedotcom
API Usage
---------
.. code:: python
>>> # 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``
.. |PyPI| image:: https://img.shields.io/pypi/v/pynamedotcom.svg
:target: https://pypi.python.org/pypi/pynamedotcom
.. |Build Status| image:: https://travis-ci.org/benmaddison/pynamedotcom.svg?branch=master
:target: https://travis-ci.org/benmaddison/pynamedotcom
.. |codecov| image:: https://codecov.io/gh/benmaddison/pynamedotcom/branch/master/graph/badge.svg
:target: https://codecov.io/gh/benmaddison/pynamedotcom
.. |Requirements Status| image:: https://requires.io/github/benmaddison/pynamedotcom/requirements.svg?branch=master
:target: https://requires.io/github/benmaddison/pynamedotcom/requirements/?branch=master
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pynamedotcom-0.1.0.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for pynamedotcom-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6952be926cf5fd46d63eeee4307dd95c42f15c091edd90267e62c29578910f87 |
|
MD5 | 7a02ace67b588ce921c9e49aecb9b8c1 |
|
BLAKE2b-256 | 69595a2a5e48c3bc93a79adf3f4cc4a3efc10d1411c614a86d980c45c110aeb6 |