Install & Compatibility
Where this runs
tested against v1.40.3 · 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 1.432s · 35.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.0s · import 1.040s · 38MB
36MB installed
● package 36MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CloudFoundryClient
✓ from cloudfoundry_client.client import CloudFoundryClient
Direct import from client module.
Organization
✓ from cloudfoundry_client.v2.organizations import Organization
V2 resources are under v2 subpackage.
Initialize client with OAuth2 credentials and list organizations.
from cloudfoundry_client.client import CloudFoundryClient
api_endpoint = 'https://api.cf.example.com'
client_id = os.environ.get('CF_CLIENT_ID', '')
client_secret = os.environ.get('CF_CLIENT_SECRET', '')
client = CloudFoundryClient(api_endpoint, client_id=client_id, client_secret=client_secret)
client.init()
orgs = client.organizations.list()
for org in orgs:
print(org['entity']['name'])
Errors
Common errors & fixes
ImportError: cannot import name 'CloudFoundryClient' from 'cloudfoundry_client'
Incorrect import path; CloudFoundryClient is not at top-level.
fixUse: from cloudfoundry_client.client import CloudFoundryClient
AttributeError: 'NoneType' object has no attribute 'list'
Forgot to call client.init() before making API calls.
fixCall client.init() after creating the client object.
requests.exceptions.HTTPError: 403 Client Error: Forbidden
OAuth token missing or insufficient permissions.
fixEnsure client_id and client_secret are correct and the client has the required scopes.
Upgrade
Version history
1.40.3latest on PyPI · released Feb 10, 2026
Audit
Dependencies
requestsrequiredHTTP client for API calls
websocket-clientoptionalWebSocket support for logs/streaming
pyyamloptionalYAML configuration parsing