Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python ServerDensity.com API wrapper

Project Description
py-serverdensity 1.x
===============================

About py-serverdensity
----------------------
``py-serverdensity`` is a lightweight object orientated Python library for the `Server Density API <https://github.com/serverdensity.com/sd-api-docs`_.

The library provides access to all the GET and POST methods in the SD API, takes care of authentication, allows you to post values as items in a dict, returns native Python objects from the service response, and raises exceptions for service errors.

Installation
------------
The library can be installed from PyPi using ``pip``::

pip install py-serverdensity

Or cloned from `Github <http://www.github.com/>`_ using ``git``::

git clone git://github.com/1stvamp/py-serverdensity.git
cd py-serverdensity
python setup.py install

Usage
-----
Once installed just import the class ``SDApi`` from the ``serverdensity.api`` module, instance the handler with your Server Density account details (remember to turn API access on for the account you're using, see `the docs <https://github.com/serverdensity/sd-api-docs#authentication>`_, and then you can access methods on each section as attributes of the API handler::

from serverdensity.api import SDApi, SDServiceError

api = SDApi(
account='foo.serverdensity.com',
username='bar',
password='baz'
)
api.alerts.getLast()
try:
api.devices.getByHostName({'hostName': 'myserver.somedomain.com'})
api.devices.getById({},{'deviceId':'device_id'})
except SDServiceError, e:
print 'Error:', e
print 'Response:', e.response
Release History

Release History

This version
History Node

1.0.12

History Node

1.0.11

History Node

1.0.10

History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
py-serverdensity-1.0.12.tar.gz (5.1 kB) Copy SHA256 Checksum SHA256 Source Aug 1, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting