Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Dyn Python SDK

Project description

# Dyn Python SDK - Developer Preview

NOTE: This is a developer preview - we welcome your feedback! Please reach out via pull request or GitHub issue.

Making DNS Updates as easy as:

from dyn.traffic import DynTraffic

# create a new instance of the API client dyn = DynTraffic(‘customername’, ‘username’, ‘password’).with_zone(‘’)

# establish an API connection dyn.session.create()

# create an A record dyn.record.create(‘A’, ‘’, {‘address’:‘’})

# create a CNAME record dyn.record.create(‘CNAME’, ‘’, {‘cname’:’’})

# delete one A record dyn.record.delete(‘A’, ‘’, <record_id>)

# delete all A record dyn.record.delete(‘A’, ‘’)

# delete a CNAME record dyn.record.delete(‘CNAME’, ‘’)

# publish changes

#Get all records from the zone

#Get all records from the node‘’)

# log out to finish session dyn.session.destroy()

Working with Messaging is as easy as:

import sys from dyn.messaging import DynMessaging import json

def show(message, result):
sys.stderr.write(message + “: ” + json.dumps(result) + ‘nn’)

client = DynMessaging(‘yourapikey’) client._client.verbose = False

# accounts (create, list, list_xheaders, update, update_headers, destroy) show(“ACCOUNTS LIST”, client.accounts.list()) show(“ACCOUNTS CREATE”, client.accounts.create(“”, “secretword”, “some company”, “1234567890”, “123 main st”, “big city”, “MA”, “12345”, “USA”, “east”, “”, “”, “”, “”, “”, “”, “”)) show(“ACCOUNTS UPDATE”, client.accounts.update(“”, “secretword”, “some company”, “1234567890”, “123 main st”, “big city”, “MA”, “12345”, “USA”, “east”, “”, “”, “”, “”, “”, “”, “”)) show(“ACCOUNTS DESTROY”, client.accounts.destroy(“”)) show(“XHEADERS LIST”, client.accounts.list_xheaders()) show(“XHEADERS UPDATE”, client.accounts.update_xheaders(‘X-MyExample1’,’X-AnotherExample2’,’X-Interesting3’,’X-Important4’))

# senders (list, details, status, create, update, dkim, destroy) show(“SENDERS LIST”, client.senders.list()) show(“SENDERS DETAILS”, client.senders.details(“”)) show(“SENDERS STATUS”, client.senders.status(“”)) show(“SENDERS CREATE”, client.senders.create(“”)) show(“SENDERS UPDATE”, client.senders.update(“”)) show(“SENDERS DKIM”, client.senders.dkim(“”, “123dkim”)) show(“SENDERS DESTROY”, client.senders.destroy(“”))

# recipients (status, activate) show(“RECIPIENTS STATUS”, client.recipients.status(“”)) show(“RECIPIENTS ACTIVATE”, client.recipients.activate(“”))

# suppressions (list, count, create, activate) show(“SUPPRESSIONS LIST”, client.suppressions.list()) show(“SUPPRESSIONS COUNT”, client.suppressions.count()) show(“SUPPRESSIONS CREATE”, client.suppressions.create(“”)) show(“SUPPRESSIONS ACTIVATE”, client.suppressions.activate(“”))

# send mail (send) show(“SEND MAIL”, client.send_mail.send(“”, “”, ‘hello’, ‘from python api’, “<html><body>’hi from python api’</body></html>”, “”, “”))

# report - delivery (list, count) show(“DELIVERY REPORT”,‘2014-01-01’,‘2014-08-01’)) show(“DELIVERY COUNTS”,‘2014-01-01’,‘2014-08-01’))

# Examples

For more comprehensive examples, check out the “examples” folder.

# API Endpoints Supported

  • Traffic - Session API: create/destroy
  • Traffic - Zone API: list/get/publish/freeze/thaw
  • Traffic - Http Redirect API: create/update/list/destroy
  • Messaging - All Endpoints Supported

# Known Issues

  • None yet

Project details

Release history Release notifications

This version
History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
dyn-python-1.0.tar.gz (6.8 kB) Copy SHA256 hash SHA256 Source None Jul 14, 2014

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