dyninc/Dynect-API-Python-Library

Name: Dynect-API-Python-Library

Owner: Dyn Inc

Description: A Python library for interacting with the Dynect Managed DNS REST API

Created: 2011-10-13 13:59:34.0

Updated: 2017-09-12 16:53:06.0

Pushed: 2016-08-12 13:24:53.0

Homepage:

Size: 15

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

This package has been deprecated in favor of Dyn-Python

Dyn Inc, Integration Team Deliverable “Copyright © 2013, Dyn Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.”


This is a simple Python wrapper for interacting with the Dynect Managed DNS REST API.

As it makes use of a JSON interface, one must either have the simplejson module installed, or have Python 2.6/2.7 which have a JSON library that comes with the language.

Use is fairly simple:

rt sys
 dynect.DynectDNS import DynectRest

_iface = DynectRest()

g in
ments = {
'customer_name': 'my_cust',
'user_name': 'my_user',  
'password': 'my_pass',

onse = rest_iface.execute('/Session/', 'POST', arguments)

esponse['status'] != 'success':
sys.exit("Incorrect credentials")

rform action
onse = rest_iface.execute('/Zone/', 'GET')
_resources = response['data']

g out, to be polite
_iface.execute('/Session/', 'DELETE')

Documentation on the REST resources can be found on the DynECT Help site


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.