pyunraid package

Submodules

pyunraid.constants module

The constants module stores constants to ensure consistency for certain status properties across versions.

pyunraid.exceptions module

exception pyunraid.exceptions.InvalidCredentials

Bases: Exception

pyunraid.helpers module

pyunraid.helpers.get(u, url)
pyunraid.helpers.get_csfr_token(url, username, password)
pyunraid.helpers.parse_size(size)
pyunraid.helpers.parse_speed(size)
pyunraid.helpers.post(u, url, payload={})

pyunraid.unraid module

class pyunraid.unraid.Unraid(url, username='root', password='')

Bases: object

The Unraid class represents an Unraid server and stores information about the server, and methods to interact with it.

SUPPORTED_VERSIONS = ['6.7.2']

Unraid server versions supported by this minor version. For each Unraid version that requires an update in pyunraid, there will be a minor version bump. For each major Unraid release, there will be a major version bump.

containers(sanitize=False)

Get a list of containers running on the server.

disks(sanitize=False)

Get a list of disks connected to the server.

get(url)

Sends a GET request to the server with correct headers and authentication.

Parameters

url – Path to send request to, it’s automatically appended to

the server URL. :returns: Requests object

get_container(id='', name='', sanitize=False)

Get a single Container object given image ID.

Parameters
  • id – The ID of the container image (e.g. 0d70980cf126)

  • name – The name of the container

get_disk(identification, sanitize=False)

Get a single Disk object given identification.

Parameters

identification – The identification of the disk

(e.g. WDC_WD80EMAZ-00WJTA0_7HKRY8MJ)

get_plugin(name, sanitize=False)

Get a single Plugin object given name.

Parameters

name – The name of the PLugin (e.g. Fix Common Problems)

get_share(name, sanitize=False)

Get a single Share object given name.

Parameters

name – The name of the Share (e.g. appdata)

get_user(name, sanitize=False)

Get a single User object given name.

Parameters

name – The name of the User (e.g. simon)

get_vm(name, sanitize=False)

Get a single VM object given name.

Parameters

name – The name of the VM (e.g. Windows 10 Gaming Machine)

notifications(sanitize=False)

Get a list of notifications on the server.

plugins(sanitize=False)

Get a list of plugins on the server.

post(url, payload={})

Sends a POST request to the server with correct headers and authentication.

Parameters

url – Path to send request to, it’s automatically appended to

the server URL. :param payload: Payload to send. :returns: Requests object

reboot()

Reboots the unraid server.

shares(sanitize=False)

Get a list of shares on the server.

users(sanitize=False)

Get a list of users on the server.

vms(sanitize=False)

Get a list of VMs running on the server.

Module contents