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

Method __init__

python/superdb/superdb.py:16–24  ·  view source on GitHub ↗
(self,
                 base_url=os.environ.get('SUPER_DB', 'http://localhost:9867'),
                 config_dir=os.path.expanduser('~/.super'))

Source from the content-addressed store, hash-verified

14
15class Client():
16 def __init__(self,
17 base_url=os.environ.get('SUPER_DB', 'http://localhost:9867'),
18 config_dir=os.path.expanduser('~/.super')):
19 self.base_url = base_url.rstrip('/')
20 self.session = requests.Session()
21 self.session.headers.update({'Accept': 'application/x-jsup'})
22 token = self.__get_auth_token(config_dir)
23 if token is not None:
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')

Callers 1

__init__Method · 0.45

Calls 2

__get_auth_tokenMethod · 0.95
updateMethod · 0.65

Tested by

no test coverage detected