Skip to content

Instantly share code, notes, and snippets.

Created August 14, 2012 22:27
What would you like to do?
slicehost - add a new zone via api with python
from pyactiveresource.activeresource import ActiveResource
api_password = 'API_KEY_HERE'
api_site = '' % api_password
class Slice(ActiveResource):
_site = api_site
class Zone(ActiveResource):
_site = api_site
class Record(ActiveResource):
_site = api_site
class Address(ActiveResource):
_site = api_site
# Address class is required for Slice class
#class Address < String; end
# Creating a new Zone
myzone = Zone({'origin':'', 'ttl':'3600'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment