Skip to main content

IBM Spectrum Virtualize REST API Python Client

Overview

This repo contains a Python SDK for interacting with the IBM Storage Virtualize REST API.

Install

  1. Ensure Python 3.9+
  2. Install dependencies (if any) using pip:
pip install -r requirements.txt
  1. Install SDK using pip:
pip install ibm-svc-rest-client

or Manual Installation:

git clone https://github.com/IBM/IBMStorageVirtualizeRestAPI.git
cd IBMStorageVirtualizeRestAPI
pip install .

Usage

Detailed usage examples (copy into your application code). Adjust model types and fields to your generated SDK version. These examples are intentionally verbose to show common patterns.

from openapi_client.api.storage_virtualize_api import StorageVirtualizeAPI
from openapi_client.rest import ApiException
from pprint import pprint  
import sys

# Instantiate (constructor already fetches an access token and sets config.access_token)
try:
    svc = StorageVirtualizeAPI("10.0.0.1", "admin", "password")
    print("Successfully authenticated and instantiated StorageVirtualizeAPI client.")
    try:
        lsarray_result = svc.svc_info_api.lsarray_post(x_auth_token=None, lsarray_post_request=None)
        # Inspect returned model (lsarray_result) for command output / status.
        pprint(lsarray_result)
    except ApiException as ex:
        # ApiException contains status code, response headers and response content in many SDKs.
        print(f"API error: {ex.reason} (status {ex.status})", file=sys.stderr)
except ApiException as ex:
    print(f"API error: {ex.reason} (status {ex.status})", file=sys.stderr)

Documentation

For detailed documentation, refer https://github.com/IBM/IBMStorageVirtualizeRestAPI/blob/main/IBM_REST_SDK_USAGE_GUIDE.md

Configuration

  • base_url: API endpoint
  • api_key: authentication token
  • other settings are usually in StorageVirtualizeAPI constructor or config file

Notes

  • Check the wrapper methods in storage_virtualize_api.py for available API calls.
  • Handle errors/exceptions as needed.

Best practices

  • Reuse HTTP client and session instead of creating many instances in production. The generated constructors that accept configuration make that possible; this utility currently uses the default client per API.
  • Protect credentials: do not hard-code plaintext passwords in real apps; use secure storage or environment variables.
  • Use context managers (with statements) for API classes when finished to release resources if they support it.
  • Check ApiResponse.status_code / ApiException to inspect error details.

These examples are commentary only and intentionally placed here as reference. Move them into your application codebase (for example a small helper class or integration tests) and adapt to your models and runtime requirements.

Metadata

Release files for ibm-svc-rest-client 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ibm-svc-rest-client 1.0.0
File Size Uploaded Provenance
ibm_svc_rest_client-1.0.0.tar.gz 316.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ibm-svc-rest-client 1.0.0
File Interpreter ABI Platform
ibm_svc_rest_client-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / ibm_svc_rest_client-1.0.0.tar.gz

Download URL ibm_svc_rest_client-1.0.0.tar.gz
Size 316.1 kB
Tags Source
SHA-256 checksum
How to use checksums
21d69e2fc93ab4cd4cbc5693b2de4ec84a0d9555a1e738dfd01d55209265973f
BLAKE2b-256 checksum
How to use checksums
ef7e969281273e398bd79733d89799a7dce7a6521cbbb18b5f85be1818b7efa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / ibm_svc_rest_client-1.0.0-py3-none-any.whl

Download URL ibm_svc_rest_client-1.0.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9fd00e9ddc6fd210bd209ab877d49ebf7cca985ed88a5af13a84ce667c089530
BLAKE2b-256 checksum
How to use checksums
3f472e6d7b1c03b52137a1f142bdd0adf19699307a29b41e998454e125f5e552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for ibm-svc-rest-client 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page