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 Common errors
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'.
Warnings
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.
Imports
- ScalewayClient wrong
from scaleway_sdk import Clientcorrectfrom scaleway import ScalewayClient - ScalewayException
from scaleway.exceptions import ScalewayException - InstanceAPI wrong
from scaleway.instance import InstanceV1correctfrom scaleway.instance.v1 import InstanceAPI
Quickstart
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)