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.36.tar.gz
(19.9 kB
view details)
Built Distribution
File details
Details for the file sd-python-wrapper-0.1.36.tar.gz
.
File metadata
- Download URL: sd-python-wrapper-0.1.36.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b18214b5dcfc1dba68341683b9df53567dc6d29fa889504e4dc1eb2dd9690a8a |
|
MD5 | 31e0a72668431c662a7967a28cbc9cd6 |
|
BLAKE2b-256 | d4b040097af528e397be7727cb3b40d15ce16fb5efe01643db2980f37d1d3531 |
File details
Details for the file sd_python_wrapper-0.1.36-py2.py3-none-any.whl
.
File metadata
- Download URL: sd_python_wrapper-0.1.36-py2.py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21d556f78c9e93b0457b27a63fd61e01b02054dd576fdf2f37f7d84969cf0d8b |
|
MD5 | eaca1293c87c0c04261026cbf40ec780 |
|
BLAKE2b-256 | 6b5e5acb7e4d5c1620673d1b982248aa293acb494f23f5ef564964ff7c48dd9b |