kobai-sdk 0.3.5rc1__py3-none-any.whl → 0.3.5rc4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of kobai-sdk might be problematic. Click here for more details.

kobai/mobi_config.py CHANGED
@@ -11,7 +11,7 @@ class MobiSettings(BaseSettings):
11
11
  mobi_password: str = "admin"
12
12
  cookies: str = ""
13
13
  use_cookies: bool = False
14
- verify_ssl = False
14
+ verify_ssl: bool = False
15
15
 
16
16
  catalog_name: str = "http://mobi.com/catalog-local"
17
17
  default_tenant_id: str = "00000000-0000-0000-0000-000000000000"
kobai/tenant_client.py CHANGED
@@ -73,7 +73,7 @@ class TenantClient:
73
73
  """
74
74
  self._init_post_auth_success(access_token)
75
75
 
76
- def use_access_token(self, access_token: str, id_token: str = None, tenant_id: str = None):
76
+ def use_access_token(self, access_token: str, id_token: str = None, tenant_id: str = None, token_provider: str = None):
77
77
 
78
78
  """
79
79
  Authenticate the TenantClient with the Kobai instance. Returns nothing, but stores bearer token in client.
@@ -88,7 +88,8 @@ class TenantClient:
88
88
  "tenantName" : self.tenant_name,
89
89
  "tenantId" : tenant_id,
90
90
  "idToken" : id_token,
91
- "accessToken" : access_token
91
+ "accessToken" : access_token,
92
+ "tokenProvider" : token_provider
92
93
  }
93
94
 
94
95
  response = self.api_client._TenantAPI__run_post(
@@ -218,13 +219,13 @@ class TenantClient:
218
219
  else:
219
220
  return True
220
221
 
221
- def spark_generate_genie_views(self, domains = None, concepts = None, not_concepts=None, enforce_map=True):
222
+ def spark_generate_genie_views(self, domains = None, concepts = None, not_concepts=None, enforce_map=True, local=False):
222
223
 
223
224
  """
224
225
  Use the Spark Client to generate views for this tenant required to populate a Genie Data Room.
225
226
  """
226
227
 
227
- tables = self.__get_view_sql(domains=domains, concepts=concepts, not_concepts=not_concepts, enforce_map=enforce_map)
228
+ tables = self.__get_view_sql(domains=domains, concepts=concepts, not_concepts=not_concepts, enforce_map=enforce_map, local=False)
228
229
  for t in tables:
229
230
  #print(t["sql"])
230
231
  try:
@@ -325,15 +326,26 @@ class TenantClient:
325
326
  # Semantic Profile
326
327
  ########################################
327
328
 
328
- def __get_descriptions(self):
329
+ #def get_descriptions(self):
330
+ # response = self.api_client._TenantAPI__run_get("/episteme-svcs/api/descriptions", params={"schema": self.schema})
331
+ # return response.json()
329
332
 
330
- tenant_config = self.get_tenant_config()
331
- descriptions = get_genie_descriptions(self.model_id, tenant_config, self.schema)
332
- return descriptions
333
+ def __get_descriptions(self, local):
333
334
 
334
- def __get_view_sql(self, domains=None, concepts=None, not_concepts=None, enforce_map=True):
335
+ if local:
336
+ tenant_config = self.get_tenant_config()
337
+ descriptions = get_genie_descriptions(self.model_id, tenant_config, self.schema)
338
+ return descriptions
339
+ else:
340
+ response = self.api_client._TenantAPI__run_get("/episteme-svcs/api/descriptions", params={"schema": self.schema})
341
+ return response.json()
342
+ #tenant_config = self.get_tenant_config()
343
+ #descriptions = get_genie_descriptions(self.model_id, tenant_config, self.schema)
344
+ #return descriptions
345
+
346
+ def __get_view_sql(self, domains=None, concepts=None, not_concepts=None, enforce_map=True, local=False):
335
347
  sql_list = []
336
- descriptions = self.__get_descriptions()
348
+ descriptions = self.__get_descriptions(local)
337
349
 
338
350
  for dom in descriptions["domains"]:
339
351
  for con in dom["concepts"]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kobai-sdk
3
- Version: 0.3.5rc1
3
+ Version: 0.3.5rc4
4
4
  Summary: A package that enables interaction with a Kobai tenant.
5
5
  Author-email: Ryan Oattes <ryan@kobai.io>
6
6
  License: Apache License
@@ -5,13 +5,13 @@ kobai/databricks_client.py,sha256=fyqqMly2Qm0r1AHWsQjkYeNsDdH0G1JSgTkF9KJ55qA,21
5
5
  kobai/demo_tenant_client.py,sha256=wlNc-bdI2wotRXo8ppUOalv4hYdBlek_WzJNARZV-AE,9293
6
6
  kobai/genie.py,sha256=-EbEYpu9xj_3zIXaPdwbNJEAmoeM7nb9qK-h1f_STtM,8061
7
7
  kobai/mobi.py,sha256=1pIAdn9qKmg2zm_DnH1qAsgKr-YgH6SJJWXEzSZch38,32787
8
- kobai/mobi_config.py,sha256=AkrGtwDNMPuwt-udbp_8KsLnLGze4S8-at2UH-zN9YQ,525
8
+ kobai/mobi_config.py,sha256=e_O4S7YjgGOb3xEOzNDx1AELuwMwXP7F3i0kGp65IrI,531
9
9
  kobai/ms_authenticate.py,sha256=f7t_BaxK8e-SUWoB6JliBEngF2iduF-COcCZq83H5t0,2297
10
10
  kobai/spark_client.py,sha256=opM_F-4Ut5Hq5zZjWMuLvUps9sDULvyPNZHXGL8dW1k,776
11
11
  kobai/tenant_api.py,sha256=Q5yuFd9_V4lo3LWzvYEEO3LpDRWFgQD4TlRPXDTGbiE,4368
12
- kobai/tenant_client.py,sha256=EeJhjdg1iFKZm0L7iSwbg4FEXbJjh6iWmdGLdKb0yC4,43470
13
- kobai_sdk-0.3.5rc1.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
14
- kobai_sdk-0.3.5rc1.dist-info/METADATA,sha256=0QRyijyJKePuaBrZ1vBYO4yjoC6NVxuUy7Uq9rS1CAU,19864
15
- kobai_sdk-0.3.5rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- kobai_sdk-0.3.5rc1.dist-info/top_level.txt,sha256=ns1El3BrTTHKvoAgU1XtiSaVIudYeCXbEEUVY8HFDZ4,6
17
- kobai_sdk-0.3.5rc1.dist-info/RECORD,,
12
+ kobai/tenant_client.py,sha256=ODlkl4SnkQN5ojuZNjh_d1Ianqb_Tv6v7SRdxwatyBw,44158
13
+ kobai_sdk-0.3.5rc4.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
14
+ kobai_sdk-0.3.5rc4.dist-info/METADATA,sha256=C3r6lkzXDjvxeKSm9X49Ysdkf688ADyPWMbPa9-Qr5w,19864
15
+ kobai_sdk-0.3.5rc4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
16
+ kobai_sdk-0.3.5rc4.dist-info/top_level.txt,sha256=ns1El3BrTTHKvoAgU1XtiSaVIudYeCXbEEUVY8HFDZ4,6
17
+ kobai_sdk-0.3.5rc4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5