This repository contains minimalistic python client for Redfish API.
Quickstart
The simplest and safest way of playing with this client is to install it into dedicated virtual environment:
$ virtualenv venv && . venv/bin/activate (venv) $ pip install redfish-client
Now we can start the interactive python interpreter and interact with the api:
(venv) $ python
>>> import redfish_client
>>> import json
>>> root = redfish_client.connect(
... "redfish.address", "username", "password"
... )
>>> print(json.dumps(root.raw, indent=2, sort_keys=True))
{
"@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
"@odata.etag": "W/\"bb7f4494b922dde991a940cc8251e8fc\"",
"@odata.id": "/redfish/v1",
"@odata.type": "#ServiceRoot.v1_2_0.ServiceRoot",
"AccountService": {
"@odata.id": "/redfish/v1/AccountService/"
},
# More content here
"UpdateService": {
"@odata.id": "/redfish/v1/UpdateService/"
}
}
>>> system = root.Systems.Members[0]
>>> print(json.dumps(system.raw, indent=2, sort_keys=True))
{
"@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem",
"@odata.etag": "W/\"788f9827a97be1a4c8cbe9c085ef4d8b\"",
"@odata.id": "/redfish/v1/Systems/1/",
"@odata.type": "#ComputerSystem.v1_4_0.ComputerSystem",
# More content here
"SystemType": "Physical",
"UUID": "REMOVED_FROM_MOCK"
}
>>> print(system.SystemType)
Physical
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
redfish-client-0.1.0.tar.gz
(7.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file redfish-client-0.1.0.tar.gz.
File metadata
- Download URL: redfish-client-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70e055607326aba99bdbdac41ff8808d5476225a4df8ba354fb3e113571352f8
|
|
| MD5 |
1b1320930bc333d57493ee22a1b2f6aa
|
|
| BLAKE2b-256 |
25a0317e70576dc1f581d2111a2c552c7284aad6b0b3ae74438a35848fcd267d
|
File details
Details for the file redfish_client-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: redfish_client-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67095a2dcd1ca30e05c3cbba33bfdcee847bdd760dcc20ad9de5fca5398c1291
|
|
| MD5 |
dccf555ef4768e3eb963a438bab54f17
|
|
| BLAKE2b-256 |
3a0c827e74af4a71218d52ce43f9961bbab8f593b42db6ce5422879f49c3eac4
|