Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Slicehost - list slice bandwidth in / bandwidth out
from pyactiveresource.activeresource import ActiveResource
api_password = 'YOUR_API_KEY_GOES_HERE'
api_site = '' % api_password
class Slice(ActiveResource):
_site = api_site
class Zone(ActiveResource):
_site = api_site
class Record(ActiveResource):
_site = api_site
slices = Slice.find()
for slice in slices:
print "ID: %d name: %s B/W In: %s B/W Out: %s" % (,, slice.bw_in, slice.bw_out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment