MCPcopy Create free account
hub / github.com/brimdata/super / __get_auth_token

Method __get_auth_token

python/superdb/superdb.py:26–36  ·  view source on GitHub ↗
(self, config_dir)

Source from the content-addressed store, hash-verified

24 self.session.headers.update({'Authorization': 'Bearer ' + token})
25
26 def __get_auth_token(self, config_dir):
27 creds_path = os.path.join(config_dir, 'credentials.json')
28 try:
29 with open(creds_path) as f:
30 data = f.read()
31 except FileNotFoundError:
32 return None
33 creds = json.loads(data)
34 if self.base_url in creds['services']:
35 return creds['services'][self.base_url]['access']
36 return None
37
38 def create_pool(self, name, layout={'order': 'desc', 'keys': [['ts']]},
39 thresh=0):

Callers 1

__init__Method · 0.95

Calls 3

openFunction · 0.85
joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected