CMS 3D CMS Logo

Functions
credentials Namespace Reference

Functions

def get_credentials (authPathEnvVar, service, authFile=None)
 
def get_credentials_from_file (service, authFile=None)
 

Function Documentation

def credentials.get_credentials (   authPathEnvVar,
  service,
  authFile = None 
)

Definition at line 13 of file credentials.py.

References get_credentials_from_file().

Referenced by db_credentials.get_readOnly_db_credentials().

13 def get_credentials( authPathEnvVar, service, authFile=None ):
14  if authFile is None:
15  if authPathEnvVar in os.environ:
16  authPath = os.environ[authPathEnvVar]
17  authFile = os.path.join(authPath, netrcFileName)
18  return get_credentials_from_file( service, authFile )
19 
20 
def get_credentials(authPathEnvVar, service, authFile=None)
Definition: credentials.py:13
def get_credentials_from_file(service, authFile=None)
Definition: credentials.py:6
def credentials.get_credentials_from_file (   service,
  authFile = None 
)

Definition at line 6 of file credentials.py.

Referenced by get_credentials().

6 def get_credentials_from_file( service, authFile=None ):
7  if not authFile is None:
8  if os.path.isdir(authFile):
9  authFile = os.path.join( authFile, netrcFileName )
10  creds = netrc.netrc( authFile ).authenticators(service)
11  return creds
12 
def get_credentials_from_file(service, authFile=None)
Definition: credentials.py:6