CMS 3D CMS Logo

Functions
credentials Namespace Reference

Functions

def get_credentials (service, authPath=None)
 
def get_credentials_from_file (service, authPath)
 

Function Documentation

◆ get_credentials()

def credentials.get_credentials (   service,
  authPath = None 
)

Definition at line 16 of file credentials.py.

16 def get_credentials( service, authPath=None ):
17  if authPath is None:
18  if authPathEnvVar in os.environ:
19  authPath = os.environ[authPathEnvVar]
20  else:
21  if defAuthPathEnvVar in os.environ:
22  authPath = os.environ[defAuthPathEnvVar]
23  else:
24  authPath = ''
25  return get_credentials_from_file( service, authPath )
26 

References get_credentials_from_file().

Referenced by db_credentials.get_db_credentials().

◆ get_credentials_from_file()

def credentials.get_credentials_from_file (   service,
  authPath 
)

Definition at line 9 of file credentials.py.

9 def get_credentials_from_file( service, authPath ):
10  authFile = netrcFileName
11  if not authPath is None:
12  authFile = os.path.join( authPath, authFile )
13  creds = netrc.netrc( authFile ).authenticators(service)
14  return creds
15 

Referenced by get_credentials().

credentials.get_credentials
def get_credentials(service, authPath=None)
Definition: credentials.py:16
credentials.get_credentials_from_file
def get_credentials_from_file(service, authPath)
Definition: credentials.py:9