ai_core_sdk.credentials
index
/home/jenkins/agent/workspace/AI-Foundation_ai-core-sdk_master/ai_core_sdk/credentials.py

 
Modules
       
json
os
pathlib

 
Classes
       
builtins.object
CredentialsValue
Service
VCAPEnvironment

 
class CredentialsValue(builtins.object)
    CredentialsValue(name: 'str', vcap_key: 'Optional[List[str]]' = None, default: 'Optional[str]' = None, transform_fn: 'Optional[Callable]' = None) -> None
 
CredentialsValue(name: 'str', vcap_key: 'Optional[List[str]]' = None, default: 'Optional[str]' = None, transform_fn: 'Optional[Callable]' = None)
 
  Methods defined here:
__eq__(self, other)
Return self==value.
__init__(self, name: 'str', vcap_key: 'Optional[List[str]]' = None, default: 'Optional[str]' = None, transform_fn: 'Optional[Callable]' = None) -> None
Initialize self.  See help(type(self)) for accurate signature.
__repr__(self)
Return repr(self).

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
__annotations__ = {'default': 'Optional[str]', 'name': 'str', 'transform_fn': 'Optional[Callable]', 'vcap_key': 'Optional[List[str]]'}
__dataclass_fields__ = {'default': Field(name='default',type='Optional[str]',defaul...appingproxy({}),kw_only=False,_field_type=_FIELD), 'name': Field(name='name',type='str',default=<dataclasse...appingproxy({}),kw_only=False,_field_type=_FIELD), 'transform_fn': Field(name='transform_fn',type='Optional[Callabl...appingproxy({}),kw_only=False,_field_type=_FIELD), 'vcap_key': Field(name='vcap_key',type='Optional[List[str]]'...appingproxy({}),kw_only=False,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)
__hash__ = None
__match_args__ = ('name', 'vcap_key', 'default', 'transform_fn')
default = None
transform_fn = None
vcap_key = None

 
class Service(builtins.object)
    Service(env: 'Dict[str, Any]')
 

 
  Methods defined here:
__getitem__(self, key)
__init__(self, env: 'Dict[str, Any]')
Initialize self.  See help(type(self)) for accurate signature.
get(self, key, default=<object object at 0x7f396d869680>)

Readonly properties defined here:
label
name

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class VCAPEnvironment(builtins.object)
    VCAPEnvironment(services: 'List[Service]') -&gt; None
 
VCAPEnvironment(services: 'List[Service]')
 
  Methods defined here:
__eq__(self, other)
Return self==value.
__getitem__(self, name) -> 'Service'
__init__(self, services: 'List[Service]') -> None
Initialize self.  See help(type(self)) for accurate signature.
__repr__(self)
Return repr(self).
get_service(self, label, exactly_one: 'bool' = True) -> 'Service'
get_service_by_name(self, name, exactly_one: 'bool' = True) -> 'Service'

Class methods defined here:
from_dict(env: 'Dict[str, Any]') from builtins.type
from_env(env_var: 'Optional[str]' = None) from builtins.type

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
__annotations__ = {'services': 'List[Service]'}
__dataclass_fields__ = {'services': Field(name='services',type='List[Service]',defau...appingproxy({}),kw_only=False,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)
__hash__ = None
__match_args__ = ('services',)

 
Functions
       
fetch_credentials(prefix: 'str', home: 'Union[str, pathlib.Path]', cred_values: 'List[CredentialsValue]', vcap_service_name: 'str' = None, profile: 'str' = None) -> 'Dict[str, str]'
from_conf(config, name, prefix, default=None, validate_fn=None)
get_nested_value(data_dict, keys: 'List[str]')
Retrieve a nested value from a dictionary using a string of keys separated by dots.
 
:param data_dict: The dictionary to search.
:param keys: A string representing nested keys, separated by dots.
:return: The value associated with the nested keys, or None if not found.
init_conf(prefix, home, profile: 'str' = None)

 
Data
        Any = typing.Any
Callable = typing.Callable
Dict = typing.Dict
ENV_NAME_VCAP_SERVICES = 'VCAP_SERVICES'
List = typing.List
NoDefault = <object object>
Optional = typing.Optional
Union = typing.Union
annotations = _Feature((3, 7, 0, 'beta', 1), (3, 11, 0, 'alpha', 0), 16777216)