skillfed

cfenv

Python wrapper for Cloud Foundry environments

cfenv v0.5.3 96.6K downloads/30d#13,202 on PyPI31
Permissive license MIT Abandoned released

What it is and what it does

py-cfenv is a lightweight wrapper around Cloud Foundry's environment variable conventions, designed to make it easier to read app metadata and service credentials in Python applications running on CF. It parses the VCAP_SERVICES and VCAP_APPLICATION JSON structures that Cloud Foundry injects into deployed apps, exposing them through a simple object interface so you can retrieve your app's name, port, and bound service credentials without manual JSON parsing.

The package depends only on furl for URL manipulation and installs with low friction. However, it has been abandoned since early 2019 and is marked Pre-Alpha; it was never intended for production use. Its classifiers list support only up to Python 3.5, and there is no indication of ongoing maintenance or compatibility with modern Python versions or Cloud Foundry API changes.

Use it for:

  • Extract app name and port from VCAP_APPLICATION in a Cloud Foundry-deployed Python app.
  • Retrieve database connection credentials for a bound PostgreSQL or MySQL service by label.
  • Build a service URL from parsed credentials (e.g., redis://user:pass@host:port).
  • Simplify environment variable parsing in a legacy Cloud Foundry application still in production.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses Cloud Foundry environment variables and service credentials into a simple Python object, extracting app metadata and service connection details from the VCAP_SERVICES environment variable.

No, unless you are maintaining a legacy Cloud Foundry application that already uses this package. The project is abandoned (last commit 2019-01-23), classified as Pre-Alpha, and has not been tested against modern Python versions. If you are starting a new Cloud Foundry project, investigate current Cloud Foundry Python tooling or parse VCAP_SERVICES directly; if you must use this, pin it and test thoroughly in your environment.

Install

cfenv on PyPI

pip

pip install cfenv

uv

uv add cfenv

poetry

poetry add cfenv

Installing cfenv

Before you install

Low install friction with a single dependency (furl). However, the package is abandoned—last commit was 2019-01-23, over six years ago, and it is classified as Pre-Alpha. Use only if you are already committed to Cloud Foundry and have no alternative.

License in practice

MIT license is permissive and imposes no restrictions on use, modification, or redistribution in your own projects.

Quickstart

pip install cfenv

from cfenv import AppEnv

env = AppEnv()
app_name = env.name
app_port = env.port
redis_service = env.get_service(label='redis')
redis_url = redis_service.get_url(host='hostname', password='password', port='port')

Requires a Cloud Foundry environment with VCAP_SERVICES and VCAP_APPLICATION environment variables set; will not function meaningfully outside a deployed CF app.

Verify before relying

  • Whether the package works reliably with modern Python versions (classifiers list only up to 3.5, released 2015–2017).
  • Whether furl's current API remains compatible with cfenv's usage patterns.
  • Active maintenance status or community forks that may have superseded this project.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — furl
Maintenance abandoned — 3,353 days since the last release
Last repo commit
First released
Downloads 96,642/month — #13,202 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cfenv-0.5.3-py2.py3-none-any.whl

Keywords: cloud, foundry

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5

Tags

cloud foundry environment variablesvcap services parsercloud foundry credentialscf app environment configcloud foundry service discoveryparse vcap servicescloud foundry python wrapper
cloud-foundrydeprecated

More Utilities packages