{"id":5092,"library":"vastdb","title":"VAST Data SDK","description":"The `vastdb` library is the official Python SDK for interacting with VAST Data Universal Storage systems. It provides programmatic access to manage and monitor VAST clusters, tenants, and other system resources. It is actively maintained with frequent releases, currently at version 2.0.14.","status":"active","version":"2.0.14","language":"en","source_language":"en","source_url":"https://github.com/vast-data/vastdb_sdk","tags":["data-storage","sdk","vast-data","database","api-client"],"install":[{"cmd":"pip install vastdb","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"HTTP client for API interactions.","package":"requests"},{"reason":"Data validation and settings management, used for data models.","package":"pydantic"},{"reason":"Optional: For loading environment variables from .env files, commonly used for credentials.","package":"python-dotenv"}],"imports":[{"note":"The package name is `vastdb`, not `vastdb_sdk` (which is the GitHub repository name).","wrong":"from vastdb_sdk import VASTClient","symbol":"VASTClient","correct":"from vastdb import VASTClient"},{"note":"Specific exceptions are found in the `vastdb.errors` submodule.","symbol":"VastdbError","correct":"from vastdb.errors import VastdbError"}],"quickstart":{"code":"import os\nfrom vastdb import VASTClient\nfrom vastdb.errors import VastdbError\n\n# Ensure these environment variables are set:\n# VAST_ENDPOINT=\"https://your-vast-cluster.example.com\"\n# VAST_USERNAME=\"your-username\"\n# VAST_PASSWORD=\"your-password\"\n# VAST_VERIFY_SSL=\"false\" (optional, for self-signed or test certs)\n\nendpoint = os.environ.get(\"VAST_ENDPOINT\", \"\")\nusername = os.environ.get(\"VAST_USERNAME\", \"\")\npassword = os.environ.get(\"VAST_PASSWORD\", \"\")\nverify_ssl = os.environ.get(\"VAST_VERIFY_SSL\", \"true\").lower() == \"true\"\n\nif not all([endpoint, username, password]):\n    print(\"Error: VAST_ENDPOINT, VAST_USERNAME, and VAST_PASSWORD environment variables must be set.\")\n    print(\"Please configure your environment or .env file.\")\nelse:\n    try:\n        client = VASTClient(\n            endpoint=endpoint,\n            username=username,\n            password=password,\n            verify_ssl=verify_ssl\n        )\n\n        print(\"Successfully initialized VASTClient.\")\n        \n        # Example: Get system information\n        system_info = client.get_system_info()\n        print(f\"Connected to VAST Data system (UUID: {system_info.uuid}, Version: {system_info.version}).\")\n\n    except VastdbError as e:\n        print(f\"VAST Data SDK Error: {e}\")\n    except Exception as e:\n        print(f\"An unexpected error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize the `VASTClient` using environment variables for credentials and endpoint, and then fetches basic system information. It's crucial to set `VAST_ENDPOINT`, `VAST_USERNAME`, and `VAST_PASSWORD` before running."},"warnings":[{"fix":"Review the official `CHANGELOG.md` on the GitHub repository for detailed breaking changes and update your code accordingly to match the new API signatures and data structures.","message":"Version 2.0.0 introduced breaking changes, particularly for existing API endpoint interactions. This may require updating how certain methods are called or how data models are structured.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure your environment is running Python 3.10.0 or a later version. Upgrade Python if necessary.","message":"The SDK requires Python 3.10 or newer. Users on older Python versions will encounter installation or runtime errors.","severity":"gotcha","affected_versions":"<3.10.0 (Python version)"},{"fix":"Always provide the full, correctly formatted URL for the VAST cluster API endpoint. Example: `https://<YOUR_VAST_IP_OR_HOSTNAME>/api/`.","message":"The `endpoint` parameter for `VASTClient` must be a complete URL, including the `https://` scheme and the correct path to the VAST API endpoint (e.g., `https://my-vast-cluster.example.com`). Omitting the scheme or providing an incorrect path will result in connection errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For production deployments, configure your system to trust the VAST cluster's SSL certificate or ensure it's signed by a trusted CA. Only set `verify_ssl=False` if you fully understand the security implications and it's absolutely necessary for non-production use cases.","message":"Disabling SSL verification (`verify_ssl=False`) should only be done in development or controlled test environments where self-signed certificates are used. In production, always ensure `verify_ssl=True` (the default) to prevent man-in-the-middle attacks.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}