A python wrapper for the Server Density Api
Project description
A python wrapper for the Server Density Api It runs on both python 2.7 and up to python 3.5
Free software: MIT license
Documentation: https://apidocs.serverdensity.com/
Up and running
There are two ways of using the api wrapper. Either calling the endpoints from an instance of ApiClient
or from an instance of the class of an endpoint such as Device
.
from serverdensity.wrapper import ApiClient
from serverdensity.wrapper import Device
token = '2dfae5bf81f65492a40569d39b29ffa3'
client = ApiClient(token)
device = client.devices.create(data={'name': 'testdevice'})
# instead of keyword arguments, it can also take a dictionary.
device2 = Device(token, name='name2')
device2.create()
# This will create an AttributeError, since name is required to create a
# device at some point.
device3 = Device(token, group='testgroup')
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sd-python-wrapper-0.1.15.tar.gz
(14.7 kB
view hashes)
Built Distribution
Close
Hashes for sd_python_wrapper-0.1.15-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88dff1aad1b9972539d678cfd00ccdb05bc23aa62d9daf41bbf202b38a295493 |
|
MD5 | e217b51f01080c8741e4a772b2c1f40a |
|
BLAKE2b-256 | cd63d2bd5d9a4f9f9f633e93f1c6dd0bf6cacb4e5ec458dd021ab6e78b1932b3 |