What's pydlink?
The pydlink is a python package which enables you to manage your D-Link devices.
How to use pydlink
Example of how to reboot a DSL-500G device.
from pydlink.dsl500g import *
try:
device = DSL500G('10.0.0.1', 23)
device.connect('admin', '******')
device.command('reboot')
except Exception, ex:
print 'Error:', str(ex)