Install & Compatibility
Where this runs
tested against v0.26.108 · 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.915 runs
installs and imports cleanly · install 0.0s · import 4.649s · 433.5MB
glibcpy 3.10–3.915 runs
installs and imports cleanly · install 20.1s · import 4.237s · 434MB
439MB installed
● package 439MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Anyscale
✓ from anyscale import Anyscale
✗ import anyscale
AnyscaleClient
✓ from anyscale import AnyscaleClient
✗ import anyscale
JobSDK
✓ from anyscale import JobSDK
✗ import anyscale
This quickstart demonstrates how to programmatically list Anyscale jobs using the SDK. Before running this code, you must authenticate the Anyscale CLI by running `anyscale login` in your terminal or by setting the `ANYSCALE_CLI_TOKEN` environment variable for non-interactive environments.
import os
import anyscale
# Ensure you have logged in via `anyscale login` or set ANYSCALE_CLI_TOKEN
# For non-interactive use, generate an API key from the Anyscale console
# and set it as an environment variable.
# os.environ['ANYSCALE_CLI_TOKEN'] = os.environ.get('ANYSCALE_CLI_TOKEN', '')
# List Anyscale jobs
try:
print("Listing Anyscale jobs...")
jobs = anyscale.job.list(max_items=5)
if jobs.results:
for job in jobs.results:
print(f" Job ID: {job.id}, Name: {job.name}, State: {job.state}")
else:
print(" No Anyscale jobs found.")
except Exception as e:
print(f"Error listing jobs: {e}")
print("Please ensure you are authenticated. Run `anyscale login` or set the ANYSCALE_CLI_TOKEN environment variable.")
anyscale --version
Debug
Known issues
breakingThe legacy `AnyscaleSDK` class is deprecated and will be removed by February 28, 2026. Migrate to directly importing `anyscale` and using `anyscale.<module>.<function>()`.fixReplace `from anyscale.sdk import AnyscaleSDK; sdk = AnyscaleSDK()` with `import anyscale` and call methods like `anyscale.job.list()`.
affects: 0.26.86 and earlier
breakingLegacy CLI commands like `anyscale cluster-env`, `anyscale cluster start/terminate`, and `anyscale machine list/delete` have been removed. Use `anyscale image` and `anyscale workspace_v2` commands instead.fixConsult the Anyscale CLI documentation for the equivalent new commands, e.g., use `anyscale image` for image management and `anyscale workspace_v2` for workspace operations.
affects: 0.26.77 and later
breakingSupport for Python 3.8 was removed starting in Anyscale CLI version 0.26.75.fixUpgrade your Python environment to version 3.9 or higher (up to <3.14).
affects: 0.26.75 and later
deprecatedThe `anyscale cloud edit` command is deprecated. Use `anyscale cloud update` instead.fixReplace calls to `anyscale cloud edit` with `anyscale cloud update`.
affects: 0.26.81 and later
deprecatedLegacy cloud SDK methods `get_cloud`, `get_default_cloud`, and `search_clouds` have been removed. Use `anyscale.cloud.get`, `anyscale.cloud.get_default`, and `anyscale.cloud.list` respectively.fixUpdate SDK code to use the new `anyscale.cloud` module methods.
affects: 0.26.85 and later
gotchaThe default value for `max_retries` when submitting jobs will change from 1 to 0 in a future release. Explicitly set `max_retries` for consistent behavior.fixAlways explicitly set the `max_retries` parameter when submitting Anyscale jobs to avoid unexpected behavior changes in future releases.
affects: All versions, proactive change recommended
Upgrade
Version history
0.26.108latest on PyPI · released Aug 18, 2026
Audit
Dependencies
pythonrequiredRuntime environment