redfish-python-sdk
A lightweight Python SDK for managing server BMCs (Baseboard Management Controllers) via the DMTF Redfish protocol. Covers system inventory, hardware inspection, power control, boot management, event subscriptions, and more.
Features
- Multi-vendor hardware inventory — inspect CPU, memory, GPU, storage, networking, power, and cooling through one SDK
- Remote power & boot control — power servers on/off, restart them, and select PXE, disk, or BIOS setup boot
- BIOS configuration — check attribute values before updating pending settings and schedule when changes take effect
- Firmware updates — update device firmware through Redfish update workflows
- Find resources quickly — discover standard and OEM resources by type and properties without hardcoding collection paths
- One-click out-of-band log download — collect diagnostic logs, wait for collection to finish, and download the bundle in one call
- Async automation — coordinate operations across multiple BMCs with
AsyncRedfishClient
Installation
# Install from PyPI
pip install redfish-python-sdk
# Or install from GitHub
pip install git+https://github.com/rednote-infra/redfish-python-sdk.git
# Install a specific version
pip install redfish-python-sdk==1.2.3
pip install git+https://github.com/rednote-infra/redfish-python-sdk.git@v1.2.3
Quick Start
import os
from redfish_sdk import RedfishClient
with RedfishClient(
host=os.environ["BMC_IP"],
username=os.environ["BMC_USER"],
password=os.environ["BMC_PASSWORD"],
verify_ssl=True,
) as client:
# Get system information.
system = client.get_system()
print(f"Server: {system.manufacturer} {system.model}")
print(f"SN: {system.serial_number}")
print(f"Power: {system.power_state}")
# Get CPU information.
for cpu in client.get_processors():
print(f"CPU: {cpu.model}, {cpu.total_cores} cores / {cpu.total_threads} threads")
# Get memory information; missing capacity stays unknown.
for mem in client.get_memory():
capacity = "unknown" if mem.capacity_mib is None else f"{mem.capacity_mib / 1024:.1f} GiB"
print(f"DIMM: {mem.manufacturer} {capacity}")
# Get drive information.
for drive in client.get_drives():
capacity = "unknown" if drive.capacity_bytes is None else f"{drive.capacity_bytes / 1e12:.1f} TB"
print(f"Drive: {drive.model} {capacity}")
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the BSD 3-Clause License.
Metadata
Release files for redfish-python-sdk 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| redfish_python_sdk-1.4.0.tar.gz | 341.8 kB | Without provenance | Details for redfish_python_sdk-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| redfish_python_sdk-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for redfish_python_sdk-1.4.0-py3-none-any.whl |
Total release size: 597.9 kB
Release files / redfish_python_sdk-1.4.0.tar.gz
| Download URL | redfish_python_sdk-1.4.0.tar.gz |
|---|---|
| Size | 341.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e27350dff526d8995a0962a5b03c0015f27744999e08efae755602a0b605c331
|
|
BLAKE2b-256 checksum How to use checksums |
f024ab8760be4bd9a14b49e61238f23455f7a0a32bf04f42312d4968f66b786e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / redfish_python_sdk-1.4.0-py3-none-any.whl
| Download URL | redfish_python_sdk-1.4.0-py3-none-any.whl |
|---|---|
| Size | 256.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac2612104330d13138014cf54558991d8b682cde4a6383251e9f6487c2d052c5
|
|
BLAKE2b-256 checksum How to use checksums |
caa379c8b043937fc72e9eb09c2fe5b9929e4259368ab59f9ea4f81c2fdc53af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for redfish-python-sdk 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.