singlestoredb 1.7.1__cp38-abi3-win32.whl → 1.7.2__cp38-abi3-win32.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 singlestoredb might be problematic. Click here for more details.

_singlestoredb_accel.pyd CHANGED
Binary file
singlestoredb/__init__.py CHANGED
@@ -13,7 +13,7 @@ Examples
13
13
 
14
14
  """
15
15
 
16
- __version__ = '1.7.1'
16
+ __version__ = '1.7.2'
17
17
 
18
18
  from typing import Any
19
19
 
@@ -1,7 +1,6 @@
1
1
  import asyncio
2
2
  import textwrap
3
3
  import typing
4
- import urllib.parse
5
4
 
6
5
  from ._config import AppConfig
7
6
  from ._connection_info import ConnectionInfo
@@ -53,8 +52,7 @@ async def run_function_app(
53
52
  def ping() -> str:
54
53
  return 'Success!'
55
54
 
56
- base_path = urllib.parse.urlparse(app_config.base_url).path
57
- app.root_path = base_path
55
+ app.root_path = app_config.base_path
58
56
 
59
57
  config = uvicorn.Config(
60
58
  app,
@@ -7,6 +7,7 @@ from typing import Optional
7
7
  class AppConfig:
8
8
  listen_port: int
9
9
  base_url: str
10
+ base_path: str
10
11
  app_token: Optional[str]
11
12
  user_token: Optional[str]
12
13
  running_interactively: bool
@@ -26,6 +27,7 @@ class AppConfig:
26
27
  def from_env(cls) -> 'AppConfig':
27
28
  port = cls._read_variable('SINGLESTOREDB_APP_LISTEN_PORT')
28
29
  base_url = cls._read_variable('SINGLESTOREDB_APP_BASE_URL')
30
+ base_path = cls._read_variable('SINGLESTOREDB_APP_BASE_PATH')
29
31
 
30
32
  workload_type = os.environ.get('SINGLESTOREDB_WORKLOAD_TYPE')
31
33
  running_interactively = workload_type == 'InteractiveNotebook'
@@ -46,6 +48,7 @@ class AppConfig:
46
48
  return cls(
47
49
  listen_port=int(port),
48
50
  base_url=base_url,
51
+ base_path=base_path,
49
52
  app_token=app_token,
50
53
  user_token=user_token,
51
54
  running_interactively=running_interactively,
@@ -1,5 +1,4 @@
1
1
  import typing
2
- import urllib.parse
3
2
 
4
3
  from ._config import AppConfig
5
4
  from ._process import kill_process_by_port
@@ -7,40 +6,33 @@ from ._stdout_supress import StdoutSuppressor
7
6
  from singlestoredb.apps._connection_info import ConnectionInfo
8
7
 
9
8
  if typing.TYPE_CHECKING:
10
- from plotly.graph_objs import Figure
9
+ from dash import Dash
11
10
 
12
11
 
13
12
  async def run_dashboard_app(
14
- figure: 'Figure',
13
+ app: 'Dash',
15
14
  debug: bool = False,
16
15
  kill_existing_app_server: bool = True,
17
16
  ) -> ConnectionInfo:
18
17
  try:
19
- import dash
18
+ from dash import Dash
20
19
  except ImportError:
21
20
  raise ImportError('package dash is required to run dashboards')
22
21
 
23
- try:
24
- from plotly.graph_objs import Figure
25
- except ImportError:
26
- raise ImportError('package dash is required to run dashboards')
27
-
28
- if not isinstance(figure, Figure):
29
- raise TypeError('figure is not an instance of plotly Figure')
22
+ if not isinstance(app, Dash):
23
+ raise TypeError('app is not an instance of Dash App')
30
24
 
31
25
  app_config = AppConfig.from_env()
32
26
 
33
27
  if kill_existing_app_server:
34
28
  kill_process_by_port(app_config.listen_port)
35
29
 
36
- base_path = urllib.parse.urlparse(app_config.base_url).path
37
-
38
- app = dash.Dash(requests_pathname_prefix=base_path)
39
- app.layout = dash.html.Div(
40
- [
41
- dash.dcc.Graph(figure=figure),
42
- ],
43
- )
30
+ if app.config.requests_pathname_prefix is None or \
31
+ app.config.requests_pathname_prefix != app_config.base_path:
32
+ raise RuntimeError('''
33
+ requests_pathname_prefix of the Dash App is invalid. Please set
34
+ requests_pathname_prefix=os.environ['SINGLESTOREDB_APP_BASE_PATH']
35
+ while initializing the Dash App and retry''')
44
36
 
45
37
  with StdoutSuppressor():
46
38
  app.run(
@@ -1432,8 +1432,6 @@ class TestConnection(unittest.TestCase):
1432
1432
  conn.close()
1433
1433
 
1434
1434
  def test_alltypes_polars(self):
1435
- self.skipTest('Polars API needs to be fixed')
1436
-
1437
1435
  if self.conn.driver in ['http', 'https']:
1438
1436
  self.skipTest('Data API does not surface unsigned int information')
1439
1437
 
@@ -1576,8 +1574,6 @@ class TestConnection(unittest.TestCase):
1576
1574
  conn.close()
1577
1575
 
1578
1576
  def test_alltypes_no_nulls_polars(self):
1579
- self.skipTest('Polars API needs to be fixed')
1580
-
1581
1577
  if self.conn.driver in ['http', 'https']:
1582
1578
  self.skipTest('Data API does not surface unsigned int information')
1583
1579
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: singlestoredb
3
- Version: 1.7.1
3
+ Version: 1.7.2
4
4
  Summary: Interface to the SingleStoreDB database and workspace management APIs
5
5
  Home-page: https://github.com/singlestore-labs/singlestoredb-python
6
6
  Author: SingleStore
@@ -1,5 +1,5 @@
1
- _singlestoredb_accel.pyd,sha256=KdlkBJxYQkN4_MADnJivWKHOzB00c426-dHZyF80ILI,59904
2
- singlestoredb/__init__.py,sha256=4dlpi9Hk7ik-4oxgBJpbDyiHtAcj-ubp6VxrfeU6GQQ,1697
1
+ _singlestoredb_accel.pyd,sha256=LoGB-5Zns3uPLNp8tjMn0JiMygZwpwrulgXeFGJGUOU,59904
2
+ singlestoredb/__init__.py,sha256=jSf2uwMGpvrTEf60dTZMxvO63yzzmKGE12bZUuCMOQA,1697
3
3
  singlestoredb/auth.py,sha256=RmYiH0Wlc2RXc4pTlRMysxtBI445ggCIwojWKC_eDLE,7844
4
4
  singlestoredb/config.py,sha256=LlrwKor_23uA9u7jWBYb-IaOKs30CjWIM7o9xCXEPcc,12721
5
5
  singlestoredb/connection.py,sha256=QC5YQemwJOhdW_-ZBFpNLE15xFxwI1fB2LuvE1hNi9k,46812
@@ -11,10 +11,10 @@ singlestoredb/ai/__init__.py,sha256=nT048t90xqjaNhz7KJ10KfSVW4RcZRoujyC6po6Nmb8,
11
11
  singlestoredb/ai/embeddings.py,sha256=KVvQY3viyYWXDBobFpj0xqiGRijt36zcHHlPNAfFAxA,770
12
12
  singlestoredb/alchemy/__init__.py,sha256=bUmCl1xUn2v36RMbXLIrvgKzZSqx71mp1ReUw9JeVA8,2613
13
13
  singlestoredb/apps/__init__.py,sha256=IKQrPKb1d_LQvmr7jXQvgPRrB5Ja_1kGAXwYvdjp6ok,120
14
- singlestoredb/apps/_cloud_functions.py,sha256=vhAnGaRPQ0_mC15oP7xH6hlyaakoaIzXBXEJOmF_Jro,2869
15
- singlestoredb/apps/_config.py,sha256=jwWA45sx5blwelF-aE5nkzlqhi5bjuUbOiGg4j1EsRA,2059
14
+ singlestoredb/apps/_cloud_functions.py,sha256=DMRC-4z3Q52hsKb_WlolfNcYV-5XmQGiJWbbaUxFZ0s,2794
15
+ singlestoredb/apps/_config.py,sha256=kMNpkc-RtPrk_XW0kLAXeF444WIlBXzI8dLnFgIW5Jw,2184
16
16
  singlestoredb/apps/_connection_info.py,sha256=t8hFOSRALXt5tqvDX0fholKoT148xktE5r__SYdH6Dk,185
17
- singlestoredb/apps/_dashboards.py,sha256=I2UDSWdC8fRTt8Y8QKz77boFMZ-mAOBZgiZDirTkaS4,1609
17
+ singlestoredb/apps/_dashboards.py,sha256=qEdDivjwS68Uukay0Qw-3awHZFpkcqapzd3vLaVUzWo,1521
18
18
  singlestoredb/apps/_process.py,sha256=eMiBO4piaRX1S6zdnMx0X0E4J7E1XrXndnVW0GRYq1Y,976
19
19
  singlestoredb/apps/_stdout_supress.py,sha256=QRV-IHQQMvWMeJfqORuVE2-Il6ohO2Ti4IokFoTCJWE,689
20
20
  singlestoredb/apps/_uvicorn_util.py,sha256=Petkmq5keBPfXZsHBrnZfY3O2rUHvb3Cw6o-BRz5MP0,994
@@ -101,7 +101,7 @@ singlestoredb/tests/test.sql,sha256=winJzhZ2W52PcQ1j8X_NNIDRBmEa-xMAYrS_hoUtAP8,
101
101
  singlestoredb/tests/test2.sql,sha256=CEM8_lX189iQU65G3Pod7lig6osfrveQyoDz6HC35YQ,38
102
102
  singlestoredb/tests/test_basics.py,sha256=tLiR46qUy8-OHHRSHsQTBp5q9NAwNPR9HvfutI6YgnM,47629
103
103
  singlestoredb/tests/test_config.py,sha256=Ad0PDmCnJMOyy9f7WTKiRasSR_3mYRByUlSb7k5ZySg,11502
104
- singlestoredb/tests/test_connection.py,sha256=BxbQDR9wav43CJTLuC-LRpqbN13uXAWdyC68Uby7zq0,122906
104
+ singlestoredb/tests/test_connection.py,sha256=UmoNo8erkcifEMbHZl83yAaRsyh6HANRdEtY3aViOK8,122792
105
105
  singlestoredb/tests/test_dbapi.py,sha256=cNJoTEZvYG7ckcwT7xqlkJX-2TDEYGTDDU1Igucp48k,679
106
106
  singlestoredb/tests/test_exceptions.py,sha256=vscMYmdOJr0JmkTAJrNI2w0Q96Nfugjkrt5_lYnw8i0,1176
107
107
  singlestoredb/tests/test_ext_func.py,sha256=gQErR-wAN8BqLNG5U4pNbg4qkQEo6Re8Hd9_Ztqo1RM,38550
@@ -125,9 +125,9 @@ singlestoredb/utils/events.py,sha256=rC9cHAetua_E1f-EiFkFM-gJzQSQIH5Uk-4sspC3KjI
125
125
  singlestoredb/utils/mogrify.py,sha256=gCcn99-vgsGVjTUV7RHJ6hH4vCNrsGB_Xo4z8kiSPDQ,4201
126
126
  singlestoredb/utils/results.py,sha256=wR70LhCqlobniZf52r67zYLBOKjWHQm68NAskdRQND8,15862
127
127
  singlestoredb/utils/xdict.py,sha256=-wi1lSPTnY99fhVMBhPKJ8cCsQhNG4GMUfkEBDKYgCw,13321
128
- singlestoredb-1.7.1.dist-info/LICENSE,sha256=Bojenzui8aPNjlF3w4ojguDP7sTf8vFV_9Gc2UAG1sg,11542
129
- singlestoredb-1.7.1.dist-info/METADATA,sha256=CxgmpzV16Zhzganmk01nIGuSNxxYKyrejdc2efZxPss,5710
130
- singlestoredb-1.7.1.dist-info/WHEEL,sha256=c4k7z5HB0t-y0nBCv6KyJ6KCjn8SEGPddD0lhaPtU3E,96
131
- singlestoredb-1.7.1.dist-info/entry_points.txt,sha256=bSLaTWB5zGjpVYPAaI46MkkDup0su-eb3uAhCNYuRV0,48
132
- singlestoredb-1.7.1.dist-info/top_level.txt,sha256=SDtemIXf-Kp-_F2f_S6x0db33cHGOILdAEsIQZe2LZc,35
133
- singlestoredb-1.7.1.dist-info/RECORD,,
128
+ singlestoredb-1.7.2.dist-info/LICENSE,sha256=Bojenzui8aPNjlF3w4ojguDP7sTf8vFV_9Gc2UAG1sg,11542
129
+ singlestoredb-1.7.2.dist-info/METADATA,sha256=EcxKSeGY473TFRuGP6W42122Mz_hry8hPLXAVseir0A,5710
130
+ singlestoredb-1.7.2.dist-info/WHEEL,sha256=c4k7z5HB0t-y0nBCv6KyJ6KCjn8SEGPddD0lhaPtU3E,96
131
+ singlestoredb-1.7.2.dist-info/entry_points.txt,sha256=bSLaTWB5zGjpVYPAaI46MkkDup0su-eb3uAhCNYuRV0,48
132
+ singlestoredb-1.7.2.dist-info/top_level.txt,sha256=SDtemIXf-Kp-_F2f_S6x0db33cHGOILdAEsIQZe2LZc,35
133
+ singlestoredb-1.7.2.dist-info/RECORD,,