Scaleway SDK

raw JSON →
2.11.0 verified Sat May 09 auth: no python

Official Python SDK for Scaleway cloud infrastructure. Current version 2.11.0, supports Python >=3.10. Active development with regular releases.

pip install scaleway
error ImportError: No module named 'scaleway_sdk'
cause Package renamed from scaleway-sdk to scaleway in v2.
fix
pip install scaleway then import: from scaleway import ScalewayClient
error AttributeError: module 'scaleway' has no attribute 'client'
cause Old pattern 'scaleway.client' replaced by ScalewayClient class.
fix
Use: from scaleway import ScalewayClient
error TypeError: __init__() got an unexpected keyword argument 'region'
cause Region parameter not supported in v2; use zone instead.
fix
Pass zone='fr-par-1' instead of region='fr-par'.
breaking v2 changed all import paths and client initialization; old 'scaleway_sdk' package is no longer compatible.
fix Use 'from scaleway import ScalewayClient' instead of 'from scaleway_sdk import Client'.
gotcha API methods are nested under service versions (e.g., instance.v1, instance.v2). Always specify the version.
fix Use e.g., client.instance.v1.list_servers() not client.instance.list_servers()
deprecated auth via environment variables SCALEWAY_ACCESS_KEY and SCALEWAY_SECRET_KEY deprecated; use SCW_ACCESS_KEY and SCW_SECRET_KEY.
fix Set SCW_ACCESS_KEY and SCW_SECRET_KEY environment variables.

Initialize client and list instances in fr-par-1 zone.

from scaleway import ScalewayClient

client = ScalewayClient(
    access_key=os.environ.get('SCW_ACCESS_KEY', ''),
    secret_key=os.environ.get('SCW_SECRET_KEY', ''),
)
# List instances
instances = client.instance.v1.list_servers(zone='fr-par-1')
print(instances)