{"library":"pypowerstore","title":"Dell PowerStore Python Library","description":"pypowerstore is the official Python library for interacting with Dell PowerStore storage arrays. It provides a programmatic interface to manage PowerStore resources like volumes, snapshots, hosts, and more. The current version is 3.4.2.0, with releases generally aligning with new PowerStore OS versions.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install pypowerstore"],"cli":null},"imports":["from pypowerstore.client import PowerStoreClient"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom pypowerstore.client import PowerStoreClient\n\nPOWERSTORE_HOST = os.environ.get('POWERSTORE_HOST', 'your_powerstore_ip')\nPOWERSTORE_USER = os.environ.get('POWERSTORE_USER', 'admin')\nPOWERSTORE_PASSWORD = os.environ.get('POWERSTORE_PASSWORD', 'password')\n\nif not all([POWERSTORE_HOST, POWERSTORE_USER, POWERSTORE_PASSWORD]):\n    print(\"Please set POWERSTORE_HOST, POWERSTORE_USER, and POWERSTORE_PASSWORD environment variables.\")\n    exit(1)\n\n# Initialize the client. For lab/dev environments, verify_ssl=False is common.\n# For production, ensure proper SSL certificate handling by configuring trusted CAs.\nclient = PowerStoreClient(\n    host=POWERSTORE_HOST,\n    username=POWERSTORE_USER,\n    password=POWERSTORE_PASSWORD,\n    verify_ssl=False # Set to True and configure trusted CAs in production environments\n)\n\ntry:\n    # Example: Get all systems\n    systems = client.system.get()\n    if systems:\n        print(f\"Successfully connected to PowerStore: System ID: {systems[0]['id']}, Name: {systems[0]['name']}, Model: {systems[0]['model']}\")\n    else:\n        print(\"No systems found.\")\n\n    # Example: Get all volumes (if any exist)\n    volumes = client.volumes.get()\n    print(f\"Found {len(volumes)} volumes.\")\n    if volumes:\n        print(f\"First volume ID: {volumes[0]['id']}, Name: {volumes[0]['name']}\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart initializes the PowerStoreClient and demonstrates fetching system information and a list of volumes. Ensure your PowerStore IP, username, and password are provided, preferably via environment variables. For production, manage SSL certificates properly instead of `verify_ssl=False`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}