Install & Compatibility
Where this runs
tested against v2.18.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 2.588s · 34MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.1s · import 2.424s · 34MB
32MB installed
● package 32MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ScaleClient
✓ import scaleapi
client = scaleapi.ScaleClient('api_key')
✗ from scaleapi import client
The SDK does not provide a direct 'client' import. Use 'scaleapi.ScaleClient'.
ScaleClient
✓ from scaleapi import ScaleClient
client = ScaleClient('api_key')
✗ from scaleapi import ScaleClient as Client
Common alias is fine, but be careful not to shadow built-in.
Initialize client with API key from environment variable and list projects.
import os
import scaleapi
api_key = os.environ.get('SCALE_API_KEY', '')
client = scaleapi.ScaleClient(api_key)
# List your projects
for project in client.get_projects():
print(project.name, project.type)
Errors
Common errors & fixes
ImportError: cannot import name 'ScaleClient' from 'scaleapi'
The module scaleapi may be outdated or installed incorrectly. Check that the package is installed and you're using the correct import path.
fixRun 'pip install --upgrade scaleapi' and then use 'import scaleapi; client = scaleapi.ScaleClient(...)'.
scaleapi.exceptions.ScaleUnauthorized: 401 Client Error: Unauthorized for url: https://api.scale.com/v1/projects
API key is invalid, missing, or expired.
fixSet the SCALE_API_KEY environment variable to a valid Scale API key. Generate a new key if needed.
TypeError: 'module' object is not callable
The user tried to call 'scaleapi()' instead of 'scaleapi.ScaleClient()'.
fixUse 'scaleapi.ScaleClient(api_key)' to create a client instance.
AttributeError: module 'scaleapi' has no attribute 'v2'
You are using a version older than 2.16.0 which does not have the v2 client.
fixUpgrade to scaleapi >= 2.16.0 with 'pip install --upgrade scaleapi'.
Upgrade
Version history
2.18.4latest on PyPI · released Apr 24, 2026
Audit
Dependencies
requestsrequiredHTTP client for API calls
python-dateutilrequiredDate parsing
urllib3requiredHTTP connection pooling