Redfish API client for Python
Project description
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
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
redfish-client-0.2.1.tar.gz
(15.7 kB
view hashes)
Built Distribution
Close
Hashes for redfish_client-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 196f90f6f716d4a5b8f720fae10ac063b86354c3d4a9d3071594f322ee2e5d2a |
|
MD5 | 31e5b8031059ad256b375614624b6c34 |
|
BLAKE2b-256 | a8f175f114c4e01857cfec53882b122cfec0258347b6131937847dd9ba1e4615 |