codeflare-sdk 0.39.1


pip install codeflare-sdk

  Latest version

Released: Sep 15, 2026


Meta
Author: Michael Clifford
Requires Python: >=3.11,<4.0

Classifiers

License
  • OSI Approved :: Apache Software License

Programming Language
  • Python :: 3
  • Python :: 3.11
  • Python :: 3.12

CodeFlare SDK

Python application coverage badge

An intuitive, easy-to-use python interface for batch resource requesting, access, job submission, and observation. Simplifying the developer's life while enabling access to high-performance compute resources, either in the cloud or on-prem.

For guided demos and basics walkthroughs, check out the following links:

  • Guided demo notebooks available here, and copies of the notebooks with expected output also available
  • these demos can be copied into your current working directory when using the codeflare-sdk by using the codeflare_sdk.copy_demo_nbs() function
  • Additionally, we have a video walkthrough of these basic demos from June, 2023

Full documentation can be found here

Installation

Can be installed via pip: pip install codeflare-sdk

Authentication

CodeFlare SDK uses kube-authkit for Kubernetes authentication, supporting multiple authentication methods:

  • Auto-Detection - Automatically detects kubeconfig or in-cluster authentication
  • Token-Based - Authenticate with API server token
  • OIDC - OpenID Connect authentication with device flow or client credentials
  • OpenShift OAuth - Native OpenShift OAuth support
  • Kubeconfig - Traditional kubeconfig file authentication
  • In-Cluster - Service account authentication when running in a pod

Quick Start

from kube_authkit import get_k8s_client, AuthConfig
from codeflare_sdk import set_api_client, Cluster, ClusterConfiguration

# Option 1: Auto-detect authentication (recommended - no explicit auth needed!)
cluster = Cluster(ClusterConfiguration(
    name='my-cluster',
    num_workers=2,
))
cluster.apply()

# Option 2: OIDC authentication
auth_config = AuthConfig(
    method="oidc",
    oidc_issuer="https://your-oidc-provider.com",
    client_id="your-client-id",
    use_device_flow=True
)
api_client = get_k8s_client(config=auth_config)
set_api_client(api_client)  # Register with CodeFlare SDK

# Option 3: OpenShift OAuth with token
auth_config = AuthConfig(
    k8s_api_host="https://api.example.com:6443",
    token="your-token"
)
api_client = get_k8s_client(config=auth_config)
set_api_client(api_client)  # Register with CodeFlare SDK

# Now create your cluster
cluster = Cluster(ClusterConfiguration(
    name='my-cluster',
    num_workers=2,
))
cluster.apply()

Migration from Legacy Authentication

If you're using the deprecated TokenAuthentication or KubeConfigFileAuthentication classes, please see our Migration Guide for detailed instructions on updating to kube-authkit.

Legacy classes (deprecated):

# ⚠️ Deprecated - will be removed in v1.0.0
from codeflare_sdk import TokenAuthentication
auth = TokenAuthentication(token="...", server="...")
auth.login()

New recommended approach:

# ✅ Recommended - Auto-detection (no explicit auth needed!)
from codeflare_sdk import Cluster, ClusterConfiguration
cluster = Cluster(ClusterConfiguration(name="my-cluster"))

# ✅ For OIDC or OpenShift OAuth with token
from kube_authkit import AuthConfig, get_k8s_client
from codeflare_sdk import set_api_client

auth_config = AuthConfig(
    k8s_api_host="https://api.example.com:6443",
    token="your-token"
)
api_client = get_k8s_client(config=auth_config)
set_api_client(api_client)  # Register with CodeFlare SDK

Development

Please see our CONTRIBUTING.md for detailed instructions.

Release Instructions

Automated Releases

It is possible to use the Release Github workflow to do the release. This is generally the process we follow for releases

Manual Releases

The following instructions apply when doing release manually. This may be required in instances where the automation is failing.

0.39.1 Sep 15, 2026
0.39.0 Sep 09, 2026
0.38.2 Jul 21, 2026
0.38.1 Jul 13, 2026
0.38.0 Jul 09, 2026
0.37.0 May 08, 2026
0.36.0 Apr 02, 2026
0.35.0 Feb 18, 2026
0.34.0 Jan 12, 2026
0.33.1 Jan 06, 2026
0.33.0 Dec 08, 2025
0.32.2 Nov 11, 2025
0.32.1 Nov 07, 2025
0.32.0 Oct 16, 2025
0.31.5 Mar 30, 2026
0.31.3 Dec 12, 2025
0.31.2 Dec 04, 2025
0.31.1 Sep 16, 2025
0.31.0 Sep 11, 2025
0.30.0 Jul 08, 2025
0.29.0 Jun 11, 2025
0.28.1 May 13, 2025
0.28.0 May 13, 2025
0.27.0 Feb 14, 2025
0.26.0 Jan 21, 2025
0.25.0 Jan 08, 2025
0.24.3 Dec 18, 2024
0.24.2 Dec 18, 2024
0.24.1 Dec 18, 2024
0.24.0 Nov 27, 2024
0.23.1 Nov 07, 2024
0.23.0 Nov 07, 2024
0.22.0 Oct 17, 2024
0.21.1 Sep 27, 2024
0.21.0 Sep 27, 2024
0.20.2 Sep 06, 2024
0.20.0 Sep 05, 2024
0.19.1 Aug 16, 2024
0.19.0 Aug 16, 2024
0.18.0 Jul 26, 2024
0.17.0 Jun 28, 2024
0.16.4 Jun 21, 2024
0.16.3 Jun 06, 2024
0.16.2 May 23, 2024
0.16.1 May 13, 2024
0.16.0 Apr 19, 2024
0.15.1 Apr 12, 2024
0.15.0 Apr 05, 2024
0.14.1 Feb 22, 2024
0.14.0 Feb 20, 2024
0.13.0 Jan 19, 2024
0.12.1 Nov 16, 2023
0.12.0 Nov 09, 2023
0.11.0 Oct 31, 2023
0.10.1 Oct 23, 2023
0.10.0 Oct 20, 2023
0.9.0 Oct 11, 2023
0.8.0 Sep 20, 2023
0.7.1 Sep 11, 2023
0.7.0 Aug 29, 2023
0.6.1 Aug 07, 2023
0.5.0 Jul 06, 2023
0.4.5 Jun 21, 2023
0.4.4 Jun 08, 2023
0.4.3 Apr 12, 2023
0.4.2 Apr 11, 2023
0.4.1 Apr 03, 2023
0.4.0 Apr 03, 2023
0.3.1 Mar 16, 2023
0.3.0 Mar 06, 2023
0.2.2 Feb 03, 2023
0.2.1 Jan 20, 2023
0.2.0 Jan 17, 2023
0.1.7 Dec 08, 2022
0.1.6 Nov 22, 2022
0.1.5 Nov 04, 2022
0.1.4 Nov 01, 2022
0.1.3 Oct 27, 2022
0.1.2 Oct 27, 2022
0.1.1 Oct 27, 2022
0.1.0 Oct 26, 2022
0.0.4 Oct 26, 2022
0.0.3 Oct 26, 2022
0.0.2 Oct 26, 2022
0.0.1 Oct 26, 2022

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
cryptography (>=46.0.7)
executing (==2.2.1)
ipywidgets (==8.1.2)
kube-authkit (>=0.4.0)
kubernetes (>=27.2.0)
openshift-client (==1.0.18)
pydantic (>=2.10.6)
ray[default,data] (==2.58.0)
rich (<15.0,>=12.5)