cloudfoundry-client
A client library for CloudFoundry
What it is and what it does
cloudfoundry-client is a Python library that wraps the Cloud Foundry REST API, allowing developers to programmatically interact with Cloud Foundry platforms—querying organizations, spaces, applications, services, and other platform entities. It supports both API V2 (legacy) and V3 (current) endpoints, with entity objects that can navigate relationships directly (e.g., calling `organization.spaces()` to fetch related spaces). The library handles authentication via user credentials, refresh tokens, or OAuth code flow, and manages token lifecycle automatically.
The package depends on aiohttp, requests, websocket-client, oauth2-client, polling2, PyYAML, and protobuf to provide HTTP communication, async support, and token management. It is actively maintained, supports modern Python versions (3.10+), and has no known security vulnerabilities. Installation is straightforward via pip with low friction.
Use it for:
- Automate Cloud Foundry platform administration tasks—creating spaces, managing security groups, or deploying applications programmatically.
- Build monitoring or observability tools that query app instances, events, and service bindings from a Cloud Foundry platform.
- Integrate Cloud Foundry deployments into CI/CD pipelines to start, stop, or update applications without shell scripting.
- Develop custom dashboards or reporting tools that aggregate data from organizations, spaces, and service instances.
- Migrate or synchronize applications and configurations across multiple Cloud Foundry environments.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for interacting with Cloud Foundry platforms via REST APIs, supporting both V2 and V3 endpoints with entity navigation and common platform operations.
Yes, with a caveat on license clarity. The package is actively maintained, has low install friction, supports current Python versions, and carries no known vulnerabilities. It is a solid choice for programmatic Cloud Foundry platform interaction. However, verify the actual license terms in the repository before use in proprietary contexts, since the package metadata does not declare a license.
Install
cloudfoundry-client on PyPI
pip
pip install cloudfoundry-clientuv
uv add cloudfoundry-clientpoetry
poetry add cloudfoundry-clientInstalling cloudfoundry-client
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a release within the last month and recent commits. Requires Python 3.10 or later.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before use in proprietary or restricted contexts.
Quickstart
pip install cloudfoundry-client
from cloudfoundry_client.client import CloudFoundryClient
client = CloudFoundryClient('https://api.example.org')
client.init_with_user_credentials('user', 'password')
for org in client.v2.organizations:
print(org['metadata']['guid'])
Requires Python 3.10 or later; credentials or tokens needed to authenticate with a Cloud Foundry platform endpoint.
Verify before relying
- Whether the unclear license status reflects a missing declaration or an actual licensing ambiguity in the repository.
- Performance characteristics and scalability limits when iterating over large numbers of entities or making concurrent requests.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — PyYAML, aiohttp, oauth2-client, polling2, protobuf, requests, websocket-client |
| Maintenance | actively maintained — 30 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 130,852/month — #11,622 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cloudfoundry_client-1.40.4-py3-none-any.whl
Keywords: cloudfoundry, cf
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
cfenvParses Cloud Foundry environment variables and…
permissive · top 15,000 on PyPI
ibm-eventnotificationsPython client library for IBM Cloud Event…
permissive · top 15,000 on PyPI
foundry-platform-sdkA Python client library for the Foundry API…
permissive · top 5,000 on PyPI
azure-ai-projectsProvides a Python client for Microsoft Foundry…
permissive · top 5,000 on PyPI
aiven-clientOfficial command-line client for Aiven's…
permissive · top 15,000 on PyPI
method-pythonPython client library for the Method API,…
permissive · top 15,000 on PyPI
foundry-local-sdkA Python SDK for discovering, downloading,…
permissive · top 15,000 on PyPI
egnyteOfficial Python client library for Egnyte's…
permissive · top 15,000 on PyPI
gcloudProvides Python client libraries for Google…
permissive · top 15,000 on PyPI
pyapacheatlasPyApacheAtlas provides a Python SDK and Excel…
permissive · top 15,000 on PyPI