{"library":"redfish","title":"Redfish Python Library","description":"The Redfish Python Library, developed by the DMTF, is a reference implementation enabling Python developers to communicate with Redfish-conformant APIs. It simplifies interactions by performing basic HTTP operations (GET, POST, PUT, PATCH, DELETE) on Redfish services. The library is actively maintained, currently at version 3.3.5, with new releases typically occurring every few months.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install redfish"],"cli":null},"imports":["import redfish\nclient = redfish.redfish_client(...)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import redfish\nimport os\n\n# Replace with your Redfish service details or use environment variables\nLOGIN_HOST = os.environ.get('REDFISH_HOST', 'https://192.168.1.100')\nLOGIN_ACCOUNT = os.environ.get('REDFISH_USERNAME', 'admin')\nLOGIN_PASSWORD = os.environ.get('REDFISH_PASSWORD', 'password')\n\ntry:\n    # Create a Redfish object\n    REDFISH_OBJ = redfish.redfish_client(\n        base_url=LOGIN_HOST,\n        username=LOGIN_ACCOUNT,\n        password=LOGIN_PASSWORD,\n        default_prefix='/redfish/v1/'\n    )\n\n    # The client automatically logs in upon creation by default.\n    # You can explicitly call login() if check_connectivity=False was used during client creation.\n    # REDFISH_OBJ.login()\n\n    # Perform a GET operation on the Service Root\n    response = REDFISH_OBJ.get('/redfish/v1/')\n    if response.status == 200:\n        print(\"Successfully connected to Redfish Service Root:\")\n        print(response.dict)\n    else:\n        print(f\"Failed to connect to Redfish Service Root: {response.status} - {response.text}\")\n\n    # Example: Get system information\n    systems_uri = response.dict.get('Systems', {}).get('@odata.id')\n    if systems_uri:\n        systems_response = REDFISH_OBJ.get(systems_uri)\n        if systems_response.status == 200:\n            print(\"\\nSystems information:\")\n            # Print the first system's summary if available\n            if systems_response.dict and 'Members' in systems_response.dict and len(systems_response.dict['Members']) > 0:\n                first_system_uri = systems_response.dict['Members'][0].get('@odata.id')\n                if first_system_uri:\n                    first_system_response = REDFISH_OBJ.get(first_system_uri)\n                    if first_system_response.status == 200:\n                        print(first_system_response.dict)\n                    else:\n                        print(f\"Failed to get first system details: {first_system_response.status}\")\n            else:\n                print(\"No systems found.\")\n        else:\n            print(f\"Failed to get systems: {systems_response.status}\")\n    else:\n        print(\"Systems collection URI not found in Service Root.\")\n\nexcept redfish.rest.v1.redfish_exception.ServerDownOrUnreachableError as e:\n    print(f\"Error: Redfish service is down or unreachable: {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")\nfinally:\n    # Ensure to log out the session\n    if 'REDFISH_OBJ' in locals() and REDFISH_OBJ:\n        try:\n            REDFISH_OBJ.logout()\n            print(\"\\nLogged out successfully.\")\n        except Exception as e:\n            print(f\"Error during logout: {e}\")","lang":"python","description":"This quickstart initializes a Redfish client, attempts to connect to the Redfish Service Root, and then fetches details about the first system if available. It demonstrates basic client creation, GET requests, and proper session logout. Credentials should be provided via environment variables for production use.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"3.3.5","pypi_latest":"3.3.5","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.5,"avg_import_s":0.62,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.57,"mem_mb":10.4,"disk_size":"22.8M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.4,"import_time_s":0.42,"mem_mb":10.4,"disk_size":"23M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.76,"mem_mb":11.4,"disk_size":"25.2M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.6,"import_time_s":0.66,"mem_mb":11.4,"disk_size":"26M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.67,"mem_mb":11.9,"disk_size":"16.9M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.3,"import_time_s":0.66,"mem_mb":11.9,"disk_size":"17M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.69,"mem_mb":12.3,"disk_size":"16.7M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.3,"import_time_s":0.69,"mem_mb":12.3,"disk_size":"17M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.58,"mem_mb":10.1,"disk_size":"22.1M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"redfish","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.7,"import_time_s":0.46,"mem_mb":10.1,"disk_size":"23M"}]}}