Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xlab-steampunk/redfish-client-python
Minimalistic Redfish API client
https://github.com/xlab-steampunk/redfish-client-python
client pypi python redfish
Last synced: about 20 hours ago
JSON representation
Minimalistic Redfish API client
- Host: GitHub
- URL: https://github.com/xlab-steampunk/redfish-client-python
- Owner: xlab-steampunk
- License: apache-2.0
- Created: 2018-08-08T05:56:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-23T05:43:35.000Z (about 1 year ago)
- Last Synced: 2024-04-24T18:55:39.578Z (7 months ago)
- Topics: client, pypi, python, redfish
- Language: Python
- Size: 54.7 KB
- Stars: 4
- Watchers: 5
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Redfish API client
==================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-clientNow 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