Skip to main content
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

Metadata

Release files for py-serverdensity 1.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-serverdensity 1.0.12
File Size Uploaded Provenance Actions
py-serverdensity-1.0.12.tar.gz 5.1 kB Without provenance Details for py-serverdensity-1.0.12.tar.gz

Release files / py-serverdensity-1.0.12.tar.gz

Download URL py-serverdensity-1.0.12.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f4bc21fa52a0906fbfbc7429caf5e83e0e9a3fd6cef01091ba2d82117bfc83fe
BLAKE2b-256 checksum
How to use checksums
2906e5ed258b05d32e4292be0960e9e7ebe12e55678d62dc1b7d522e78f667ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for py-serverdensity 1.0.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page