Couldn’t we follow the same pattern as Bluemix apps where services would be bound to the app (DSX project) and use the VCAP_SERVICES environment variable?
vcap_services = os.getenv("VCAP_SERVICES")
vcap = json.loads(vcap_services)
# Cloudant details
cloudant_credentials = vcap['cloudantNoSQLDB']['credentials']
CL_HOST = cloudant_credentials['host']
CL_USER = cloudant_credentials['username']
CL_PASS = cloudant_credentials['password']
CL_URL = cloudant_credentials['url']
Why is it useful?
|Who would benefit from this IDEA?|
How should it work?