{"id":20912,"library":"aistore","title":"AIStore Python SDK","description":"Python client SDK for AIStore (AIS), a high-performance object storage cluster for AI and deep learning workloads. The SDK provides APIs to manage clusters, buckets, and objects, supporting S3-compatible and Google Cloud Storage backends. Current version is 1.23.0, compatible with AIS server clusters running version 4.x. Releases follow irregular cadence, roughly 1 minor version per month.","status":"active","version":"1.23.0","language":"python","source_language":"en","source_url":"https://github.com/NVIDIA/aistore/tree/main/python/aistore/sdk","tags":["AIStore","object-storage","NVIDIA","deep-learning","ML"],"install":[{"cmd":"pip install aistore","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false},{"reason":"Underlying HTTP transport","package":"urllib3","optional":false}],"imports":[{"note":"The SDK is in aistore.sdk subpackage","wrong":"from aistore import Client","symbol":"Client","correct":"from aistore.sdk import Client"},{"note":null,"wrong":null,"symbol":"Bucket","correct":"from aistore.sdk import Bucket"},{"note":null,"wrong":null,"symbol":"Object","correct":"from aistore.sdk import Object"}],"quickstart":{"code":"from aistore.sdk import Client\n\n# Initialize client with AIS gateway endpoint\ngateway_url = os.environ.get('AIS_ENDPOINT', 'http://localhost:8080')\nclient = Client(gateway_url)\n\n# Create a bucket (if not exists)\ntry:\n    client.create_bucket('my-bucket')\nexcept Exception as e:\n    print(f'Bucket may already exist: {e}')\n\n# Put an object\nbucket = client.bucket('my-bucket')\nbucket.object('hello.txt').put_content('Hello, AIStore!')\n\n# Get the object back\nobj = bucket.object('hello.txt').get()\nprint(obj.read_text())  # Hello, AIStore!","lang":"python","description":"Create a client, a bucket, put and get an object"},"warnings":[{"fix":"Use the proxy/gateway URL (usually port 8080).","message":"The SDK's client must point to the AIS gateway (proxy) endpoint, not a target node. Connecting directly to a target will fail for many operations.","severity":"gotcha","affected_versions":"all"},{"fix":"client.create_bucket('my-bucket', provider='s3') or client.bucket('my-bucket', provider='s3').object('key').get()","message":"When using S3 or GCS backends, you must add the provider argument (e.g., 's3' or 'gcs') when creating or accessing the bucket. Otherwise AIStore defaults to the AIS internal provider and will not see the remote bucket.","severity":"gotcha","affected_versions":"all"},{"fix":"Use bucket.object('key').put_content(data) and bucket.object('key').get() instead.","message":"The method `put_object` and `get_object` have been deprecated in favor of `object.put_content` and `object.get`.","severity":"deprecated","affected_versions":">=1.20.0"},{"fix":"Update the SDK to >=1.23.0 to support server 4.x.","message":"Starting from version 4.0 of the AIS server, the object metadata format changed (v2). SDK versions < 1.23.0 may not parse v2 metadata correctly, causing errors when listing objects.","severity":"breaking","affected_versions":"server >= 4.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use: from aistore.sdk import Client","cause":"Trying to import Client from the top-level aistore package instead of aistore.sdk.","error":"ImportError: cannot import name 'Client' from 'aistore'"},{"fix":"Ensure AIS_ENDPOINT points to the proxy URL (usually http://<PROXY_IP>:8080) and that the proxy is running.","cause":"The client is trying to connect to a target node instead of the gateway/proxy, or the gateway is not reachable.","error":"aistore.sdk.errors.AISConnectionError: Failed to connect to ..."},{"fix":"Pass provider='s3' or provider='gcs' to bucket() or create_bucket().","cause":"Attempting to access a remote bucket (S3, GCS) without specifying the provider.","error":"aistore.sdk.errors.AISBadArgument: Bucket provider is required"},{"fix":"Upgrade to latest aistore with: pip install --upgrade aistore","cause":"Using an older SDK version (<1.20.0) that still uses put_object/get_object.","error":"AttributeError: 'Object' object has no attribute 'put_content'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}