singlestoredb 1.12.4__cp38-abi3-win_amd64.whl → 1.13.1__cp38-abi3-win_amd64.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.

Files changed (36) hide show
  1. _singlestoredb_accel.pyd +0 -0
  2. singlestoredb/__init__.py +1 -1
  3. singlestoredb/ai/__init__.py +1 -0
  4. singlestoredb/ai/chat.py +26 -0
  5. singlestoredb/ai/embeddings.py +18 -15
  6. singlestoredb/apps/__init__.py +1 -0
  7. singlestoredb/apps/_config.py +6 -0
  8. singlestoredb/apps/_connection_info.py +8 -0
  9. singlestoredb/apps/_python_udfs.py +85 -0
  10. singlestoredb/config.py +14 -2
  11. singlestoredb/functions/__init__.py +15 -1
  12. singlestoredb/functions/decorator.py +102 -252
  13. singlestoredb/functions/dtypes.py +545 -198
  14. singlestoredb/functions/ext/asgi.py +421 -129
  15. singlestoredb/functions/ext/json.py +29 -36
  16. singlestoredb/functions/ext/mmap.py +1 -1
  17. singlestoredb/functions/ext/rowdat_1.py +50 -70
  18. singlestoredb/functions/signature.py +816 -144
  19. singlestoredb/functions/typing.py +41 -0
  20. singlestoredb/functions/utils.py +421 -0
  21. singlestoredb/http/connection.py +3 -1
  22. singlestoredb/management/inference_api.py +101 -0
  23. singlestoredb/management/manager.py +6 -1
  24. singlestoredb/management/organization.py +17 -0
  25. singlestoredb/management/utils.py +2 -2
  26. singlestoredb/tests/ext_funcs/__init__.py +476 -237
  27. singlestoredb/tests/test_ext_func.py +192 -3
  28. singlestoredb/tests/test_management.py +5 -5
  29. singlestoredb/tests/test_udf.py +101 -131
  30. singlestoredb/tests/test_udf_returns.py +459 -0
  31. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/METADATA +2 -1
  32. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/RECORD +36 -30
  33. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/LICENSE +0 -0
  34. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/WHEEL +0 -0
  35. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/entry_points.txt +0 -0
  36. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,459 @@
1
+ # mypy: disable-error-code="type-arg"
2
+ # from __future__ import annotations
3
+ import unittest
4
+ from typing import Any
5
+ from typing import Callable
6
+ from typing import List
7
+ from typing import NamedTuple
8
+ from typing import Optional
9
+ from typing import TypedDict
10
+
11
+ import numpy as np
12
+ import numpy.typing as npt
13
+ import pandas as pd
14
+ import polars as pl
15
+ import pyarrow as pa
16
+ from pydantic import BaseModel
17
+
18
+ from singlestoredb.functions import Table
19
+ from singlestoredb.functions import udf
20
+ from singlestoredb.functions.signature import get_signature
21
+ from singlestoredb.functions.signature import signature_to_sql
22
+
23
+
24
+ def to_sql(func: Callable[..., Any]) -> str:
25
+ """Convert a function signature to SQL."""
26
+ out = signature_to_sql(get_signature(func))
27
+ return out.split('EXTERNAL FUNCTION ')[1].split('AS REMOTE')[0].strip()
28
+
29
+
30
+ class Parameters(NamedTuple):
31
+ x: Optional[str] = ''
32
+
33
+
34
+ class UDFTuple(NamedTuple):
35
+ value: str
36
+
37
+
38
+ class TVFTuple(NamedTuple):
39
+ idx: int
40
+ value: Optional[str]
41
+
42
+
43
+ class TVFDict(TypedDict):
44
+ idx: int
45
+ value: Optional[str]
46
+
47
+
48
+ class TVFBaseModel(BaseModel):
49
+ idx: int
50
+ value: Optional[str]
51
+
52
+
53
+ class UDFResultsTest(unittest.TestCase):
54
+
55
+ def test_udf_returns(self) -> None:
56
+ # Plain UDF
57
+ @udf
58
+ def foo_a(x: str) -> str:
59
+ return f'0: {x}'
60
+
61
+ foo_a_out = foo_a('cat')
62
+
63
+ assert type(foo_a_out) is str
64
+ assert foo_a_out == '0: cat'
65
+ assert to_sql(foo_a) == '`foo_a`(`x` TEXT NOT NULL) RETURNS TEXT NOT NULL'
66
+
67
+ # Vectorized UDF using lists
68
+ @udf
69
+ def foo_b(x: List[str]) -> List[str]:
70
+ return [f'{i}: {y}' for i, y in enumerate(x)]
71
+
72
+ foo_b_out = foo_b(['cat', 'dog', 'monkey'])
73
+
74
+ assert type(foo_b_out) is list
75
+ assert foo_b_out == ['0: cat', '1: dog', '2: monkey']
76
+ assert to_sql(foo_b) == '`foo_b`(`x` TEXT NOT NULL) RETURNS TEXT NOT NULL'
77
+
78
+ # Illegal return type for UDF
79
+ @udf
80
+ def foo_c(x: List[str]) -> List[UDFTuple]:
81
+ return [UDFTuple(value='invalid')]
82
+
83
+ # Vectorized UDF using pandas Series
84
+ @udf(args=Parameters, returns=UDFTuple)
85
+ def foo_d(x: pd.Series) -> pd.Series:
86
+ return pd.Series([f'{i}: {y}' for i, y in enumerate(x)])
87
+
88
+ foo_d_out = foo_d(pd.Series(['cat', 'dog', 'monkey']))
89
+
90
+ assert type(foo_d_out) is pd.Series
91
+ assert list(foo_d_out) == ['0: cat', '1: dog', '2: monkey']
92
+ assert to_sql(foo_d) == "`foo_d`(`x` TEXT NULL DEFAULT '') RETURNS TEXT NOT NULL"
93
+
94
+ # Vectorized UDF using polars Series
95
+ @udf(args=Parameters, returns=UDFTuple)
96
+ def foo_e(x: pl.Series) -> pl.Series:
97
+ return pl.Series([f'{i}: {y}' for i, y in enumerate(x)])
98
+
99
+ foo_e_out = foo_e(pl.Series(['cat', 'dog', 'monkey']))
100
+
101
+ assert type(foo_e_out) is pl.Series
102
+ assert list(foo_e_out) == ['0: cat', '1: dog', '2: monkey']
103
+ assert to_sql(foo_e) == "`foo_e`(`x` TEXT NULL DEFAULT '') RETURNS TEXT NOT NULL"
104
+
105
+ # Vectorized UDF using numpy arrays
106
+ @udf(args=Parameters, returns=UDFTuple)
107
+ def foo_f(x: np.ndarray) -> np.ndarray:
108
+ return np.array([f'{i}: {y}' for i, y in enumerate(x)])
109
+
110
+ foo_f_out = foo_f(np.array(['cat', 'dog', 'monkey']))
111
+
112
+ assert type(foo_f_out) is np.ndarray
113
+ assert list(foo_f_out) == ['0: cat', '1: dog', '2: monkey']
114
+ assert to_sql(foo_f) == "`foo_f`(`x` TEXT NULL DEFAULT '') RETURNS TEXT NOT NULL"
115
+
116
+ # Vectorized UDF using typed numpy arrays
117
+ @udf
118
+ def foo_g(x: npt.NDArray[np.str_]) -> npt.NDArray[np.str_]:
119
+ return np.array([f'{i}: {y}' for i, y in enumerate(x)])
120
+
121
+ foo_g_out = foo_g(np.array(['cat', 'dog', 'monkey']))
122
+
123
+ assert type(foo_g_out) is np.ndarray
124
+ assert list(foo_g_out) == ['0: cat', '1: dog', '2: monkey']
125
+ assert to_sql(foo_g) == '`foo_g`(`x` TEXT NOT NULL) RETURNS TEXT NOT NULL'
126
+
127
+ # Plain TVF using one list
128
+ @udf
129
+ def foo_h_(x: str) -> Table[List[str]]:
130
+ return Table([x] * 3)
131
+
132
+ foo_h__out = foo_h_('cat')
133
+
134
+ assert type(foo_h__out) is Table
135
+ assert foo_h__out == Table(['cat', 'cat', 'cat'])
136
+
137
+ assert to_sql(foo_h_) == \
138
+ '`foo_h_`(`x` TEXT NOT NULL) RETURNS TABLE(`a` TEXT NOT NULL)'
139
+
140
+ # Plain TVF using multiple lists -- Illegal!
141
+ @udf
142
+ def foo_h(x: str) -> Table[List[int], List[str]]:
143
+ return Table(list(range(3)), [x] * 3)
144
+
145
+ foo_h_out = foo_h('cat')
146
+
147
+ assert type(foo_h_out) is Table
148
+ assert foo_h_out == Table([0, 1, 2], ['cat', 'cat', 'cat'])
149
+
150
+ with self.assertRaises(TypeError):
151
+ to_sql(foo_h)
152
+
153
+ # Plain TVF using lists of NamedTuples
154
+ @udf
155
+ def foo_i(x: str) -> Table[List[TVFTuple]]:
156
+ return Table([
157
+ TVFTuple(idx=0, value=x),
158
+ TVFTuple(idx=1, value=x),
159
+ TVFTuple(idx=2, value=x),
160
+ ])
161
+
162
+ foo_i_out = foo_i('cat')
163
+
164
+ assert type(foo_i_out) is Table
165
+ assert foo_i_out == Table([
166
+ TVFTuple(idx=0, value='cat'),
167
+ TVFTuple(idx=1, value='cat'),
168
+ TVFTuple(idx=2, value='cat'),
169
+ ])
170
+ assert to_sql(foo_i) == (
171
+ '`foo_i`(`x` TEXT NOT NULL) '
172
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
173
+ )
174
+
175
+ # Plain TVF using lists of TypedDicts
176
+ @udf
177
+ def foo_j(x: str) -> Table[List[TVFDict]]:
178
+ return Table([
179
+ dict(idx=0, value=x),
180
+ dict(idx=1, value=x),
181
+ dict(idx=2, value=x),
182
+ ])
183
+
184
+ foo_j_out = foo_j('cat')
185
+
186
+ assert type(foo_j_out) is Table
187
+ assert foo_j_out == Table([
188
+ dict(idx=0, value='cat'),
189
+ dict(idx=1, value='cat'),
190
+ dict(idx=2, value='cat'),
191
+ ])
192
+ assert to_sql(foo_j) == (
193
+ '`foo_j`(`x` TEXT NOT NULL) '
194
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
195
+ )
196
+
197
+ # Plain TVF using lists of pydantic BaseModels
198
+ @udf
199
+ def foo_k(x: str) -> Table[List[TVFBaseModel]]:
200
+ return Table([
201
+ TVFBaseModel(idx=0, value=x),
202
+ TVFBaseModel(idx=1, value=x),
203
+ TVFBaseModel(idx=2, value=x),
204
+ ])
205
+
206
+ foo_k_out = foo_k('cat')
207
+
208
+ assert type(foo_k_out) is Table
209
+ assert foo_k_out == Table([
210
+ TVFBaseModel(idx=0, value='cat'),
211
+ TVFBaseModel(idx=1, value='cat'),
212
+ TVFBaseModel(idx=2, value='cat'),
213
+ ])
214
+ assert to_sql(foo_k) == (
215
+ '`foo_k`(`x` TEXT NOT NULL) '
216
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
217
+ )
218
+
219
+ # Plain TVF using pandas Series
220
+ @udf(returns=TVFTuple)
221
+ def foo_l(x: str) -> Table[pd.Series, pd.Series]:
222
+ return Table(pd.Series(range(3)), pd.Series([x] * 3))
223
+
224
+ foo_l_out = foo_l('cat')
225
+
226
+ assert type(foo_l_out) is Table
227
+ assert len(foo_l_out) == 2
228
+ assert type(foo_l_out[0]) is pd.Series
229
+ assert list(foo_l_out[0]) == [0, 1, 2]
230
+ assert type(foo_l_out[1]) is pd.Series
231
+ assert list(foo_l_out[1]) == ['cat', 'cat', 'cat']
232
+ assert to_sql(foo_l) == (
233
+ '`foo_l`(`x` TEXT NOT NULL) '
234
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
235
+ )
236
+
237
+ # Plain TVF using polars Series
238
+ @udf(returns=TVFTuple)
239
+ def foo_m(x: str) -> Table[pl.Series, pl.Series]:
240
+ return Table(pl.Series(range(3)), pl.Series([x] * 3))
241
+
242
+ foo_m_out = foo_m('cat')
243
+
244
+ assert type(foo_m_out) is Table
245
+ assert len(foo_m_out) == 2
246
+ assert type(foo_m_out[0]) is pl.Series
247
+ assert list(foo_m_out[0]) == [0, 1, 2]
248
+ assert type(foo_m_out[1]) is pl.Series
249
+ assert list(foo_m_out[1]) == ['cat', 'cat', 'cat']
250
+ assert to_sql(foo_m) == (
251
+ '`foo_m`(`x` TEXT NOT NULL) '
252
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
253
+ )
254
+
255
+ # Plain TVF using pyarrow Array
256
+ @udf(returns=TVFTuple)
257
+ def foo_n(x: str) -> Table[pa.Array, pa.Array]:
258
+ return Table(pa.array(range(3)), pa.array([x] * 3))
259
+
260
+ foo_n_out = foo_n('cat')
261
+
262
+ assert type(foo_n_out) is Table
263
+ assert foo_n_out == Table(pa.array([0, 1, 2]), pa.array(['cat', 'cat', 'cat']))
264
+ assert to_sql(foo_n) == (
265
+ '`foo_n`(`x` TEXT NOT NULL) '
266
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
267
+ )
268
+
269
+ # Plain TVF using numpy arrays
270
+ @udf(returns=TVFTuple)
271
+ def foo_o(x: str) -> Table[np.ndarray, np.ndarray]:
272
+ return Table(np.array(range(3)), np.array([x] * 3))
273
+
274
+ foo_o_out = foo_o('cat')
275
+
276
+ assert type(foo_o_out) is Table
277
+ assert len(foo_o_out) == 2
278
+ assert type(foo_o_out[0]) is np.ndarray
279
+ assert list(foo_o_out[0]) == [0, 1, 2]
280
+ assert type(foo_o_out[1]) is np.ndarray
281
+ assert list(foo_o_out[1]) == ['cat', 'cat', 'cat']
282
+ assert to_sql(foo_o) == (
283
+ '`foo_o`(`x` TEXT NOT NULL) '
284
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
285
+ )
286
+
287
+ # Plain TVF using typed numpy arrays
288
+ @udf
289
+ def foo_p(x: str) -> Table[npt.NDArray[np.int_], npt.NDArray[np.str_]]:
290
+ return Table(np.array(range(3)), np.array([x] * 3))
291
+
292
+ foo_p_out = foo_p('cat')
293
+
294
+ assert type(foo_p_out) is Table
295
+ assert len(foo_p_out) == 2
296
+ assert type(foo_p_out[0]) is np.ndarray
297
+ assert list(foo_p_out[0]) == [0, 1, 2]
298
+ assert type(foo_p_out[1]) is np.ndarray
299
+ assert list(foo_p_out[1]) == ['cat', 'cat', 'cat']
300
+ assert to_sql(foo_p) == (
301
+ '`foo_p`(`x` TEXT NOT NULL) '
302
+ 'RETURNS TABLE(`a` BIGINT NOT NULL, `b` TEXT NOT NULL)'
303
+ )
304
+
305
+ # Plain TVF using pandas DataFrame
306
+ @udf(returns=TVFTuple)
307
+ def foo_q(x: str) -> Table[pd.DataFrame]:
308
+ return Table(pd.DataFrame([[0, x], [1, x], [2, x]])) # columns???
309
+
310
+ foo_q_out = foo_q('cat')
311
+
312
+ assert type(foo_q_out) is Table
313
+ assert len(foo_q_out) == 1
314
+ assert list(foo_q_out[0].iloc[:, 0]) == [0, 1, 2]
315
+ assert list(foo_q_out[0].iloc[:, 1]) == ['cat', 'cat', 'cat']
316
+ assert to_sql(foo_q) == (
317
+ '`foo_q`(`x` TEXT NOT NULL) '
318
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
319
+ )
320
+
321
+ # Plain TVF using polars DataFrame
322
+ @udf(returns=TVFTuple)
323
+ def foo_r(x: str) -> Table[pl.DataFrame]:
324
+ return Table(pl.DataFrame([[0, 1, 2], [x] * 3])) # columns???
325
+
326
+ foo_r_out = foo_r('cat')
327
+
328
+ assert type(foo_r_out) is Table
329
+ assert len(foo_r_out) == 1
330
+ assert list(foo_r_out[0][:, 0]) == [0, 1, 2]
331
+ assert list(foo_r_out[0][:, 1]) == ['cat', 'cat', 'cat']
332
+ assert to_sql(foo_r) == (
333
+ '`foo_r`(`x` TEXT NOT NULL) '
334
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
335
+ )
336
+
337
+ # Plain TVF using pyarrow Table
338
+ @udf(returns=TVFTuple)
339
+ def foo_s(x: str) -> Table[pa.Table]:
340
+ return Table(
341
+ pa.Table.from_pylist([
342
+ dict(idx=0, value='cat'),
343
+ dict(idx=1, value='cat'),
344
+ dict(idx=2, value='cat'),
345
+ ]),
346
+ ) # columns???
347
+
348
+ foo_s_out = foo_s('cat')
349
+
350
+ assert type(foo_s_out) is Table
351
+ assert foo_s_out == Table(
352
+ pa.Table.from_pylist([
353
+ dict(idx=0, value='cat'),
354
+ dict(idx=1, value='cat'),
355
+ dict(idx=2, value='cat'),
356
+ ]),
357
+ )
358
+ assert to_sql(foo_s) == (
359
+ '`foo_s`(`x` TEXT NOT NULL) '
360
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
361
+ )
362
+
363
+ # Vectorized TVF using lists -- Illegal!
364
+ @udf
365
+ def foo_t(x: List[str]) -> Table[List[int], List[str]]:
366
+ return Table(list(range(len(x))), x)
367
+
368
+ foo_t_out = foo_t(['cat', 'dog', 'monkey'])
369
+
370
+ assert type(foo_t_out) is Table
371
+ assert foo_t_out == Table([0, 1, 2], ['cat', 'dog', 'monkey'])
372
+ with self.assertRaises(TypeError):
373
+ to_sql(foo_t)
374
+
375
+ # Vectorized TVF using pandas Series
376
+ @udf(args=Parameters, returns=TVFTuple)
377
+ def foo_u(x: pd.Series) -> Table[pd.Series, pd.Series]:
378
+ return Table(pd.Series(range(len(x))), pd.Series(x))
379
+
380
+ foo_u_out = foo_u(pd.Series(['cat', 'dog', 'monkey']))
381
+
382
+ assert type(foo_u_out) is Table
383
+ assert len(foo_u_out) == 2
384
+ assert list(foo_u_out[0]) == [0, 1, 2]
385
+ assert list(foo_u_out[1]) == ['cat', 'dog', 'monkey']
386
+ assert to_sql(foo_u) == (
387
+ "`foo_u`(`x` TEXT NULL DEFAULT '') "
388
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
389
+ )
390
+
391
+ # Vectorized TVF using polars Series
392
+ @udf(args=Parameters, returns=TVFTuple)
393
+ def foo_v(x: pl.Series) -> Table[pl.Series, pl.Series]:
394
+ return Table(pl.Series(range(len(x))), pl.Series(x))
395
+
396
+ foo_v_out = foo_v(pl.Series(['cat', 'dog', 'monkey']))
397
+
398
+ assert type(foo_v_out) is Table
399
+ assert len(foo_v_out) == 2
400
+ assert list(foo_v_out[0]) == [0, 1, 2]
401
+ assert list(foo_v_out[1]) == ['cat', 'dog', 'monkey']
402
+ assert to_sql(foo_v) == (
403
+ "`foo_v`(`x` TEXT NULL DEFAULT '') "
404
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
405
+ )
406
+
407
+ # Vectorized TVF using pyarrow Array
408
+ @udf(args=Parameters, returns=TVFTuple)
409
+ def foo_w(x: pa.Array) -> Table[pa.Array, pa.Array]:
410
+ return Table(pa.array(range(len(x))), pa.array(x))
411
+
412
+ foo_w_out = foo_w(pa.array(['cat', 'dog', 'monkey']))
413
+
414
+ assert type(foo_w_out) is Table
415
+ assert foo_w_out == Table(
416
+ pa.array([0, 1, 2]), pa.array(['cat', 'dog', 'monkey']),
417
+ )
418
+ assert to_sql(foo_w) == (
419
+ "`foo_w`(`x` TEXT NULL DEFAULT '') "
420
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
421
+ )
422
+
423
+ # Vectorized TVF using numpy arrays
424
+ @udf(args=Parameters, returns=TVFTuple)
425
+ def foo_x(x: np.ndarray) -> Table[np.ndarray, np.ndarray]:
426
+ return Table(np.array(range(len(x))), np.array(x))
427
+
428
+ foo_x_out = foo_x(np.array(['cat', 'dog', 'monkey']))
429
+
430
+ assert type(foo_x_out) is Table
431
+ assert len(foo_x_out) == 2
432
+ assert list(foo_x_out[0]) == [0, 1, 2]
433
+ assert list(foo_x_out[1]) == ['cat', 'dog', 'monkey']
434
+ assert to_sql(foo_x) == (
435
+ "`foo_x`(`x` TEXT NULL DEFAULT '') "
436
+ 'RETURNS TABLE(`idx` BIGINT NOT NULL, `value` TEXT NULL)'
437
+ )
438
+
439
+ # Vectorized TVF using typed numpy arrays
440
+ @udf
441
+ def foo_y(
442
+ x: npt.NDArray[np.str_],
443
+ ) -> Table[npt.NDArray[np.int_], npt.NDArray[np.str_]]:
444
+ return Table(np.array(range(len(x))), np.array(x))
445
+
446
+ foo_y_out = foo_y(np.array(['cat', 'dog', 'monkey']))
447
+
448
+ assert type(foo_y_out) is Table
449
+ assert len(foo_y_out) == 2
450
+ assert list(foo_y_out[0]) == [0, 1, 2]
451
+ assert list(foo_y_out[1]) == ['cat', 'dog', 'monkey']
452
+ assert to_sql(foo_y) == (
453
+ '`foo_y`(`x` TEXT NOT NULL) '
454
+ 'RETURNS TABLE(`a` BIGINT NOT NULL, `b` TEXT NOT NULL)'
455
+ )
456
+
457
+
458
+ if __name__ == '__main__':
459
+ unittest.main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: singlestoredb
3
- Version: 1.12.4
3
+ Version: 1.13.1
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
@@ -22,6 +22,7 @@ Requires-Dist: setuptools
22
22
  Requires-Dist: sqlparams
23
23
  Requires-Dist: wheel
24
24
  Requires-Dist: tomli >=1.1.0 ; python_version < "3.11"
25
+ Requires-Dist: typing-extensions <=4.13.2 ; python_version < "3.11"
25
26
  Provides-Extra: dataframe
26
27
  Requires-Dist: ibis-singlestoredb ; extra == 'dataframe'
27
28
  Provides-Extra: dbt
@@ -1,34 +1,38 @@
1
- _singlestoredb_accel.pyd,sha256=BjwcTKJQb9p7VofVO-Lrg_BXA6nM4nvVUNyKF9WkU7c,59392
2
- singlestoredb/__init__.py,sha256=Y3oYr5E9O4QiB6TxEq0HF58H-agjoOb93fc2WyLXPBg,1712
1
+ _singlestoredb_accel.pyd,sha256=n4oYggBtLgFHDfEEd8c01AHMlcvUrv2eTga5XAF978g,61440
2
+ singlestoredb/__init__.py,sha256=M6sWPnnrYVitraV7HD5cUx71dFDnwnRDUaDyoOAJPEU,1712
3
3
  singlestoredb/auth.py,sha256=RmYiH0Wlc2RXc4pTlRMysxtBI445ggCIwojWKC_eDLE,7844
4
- singlestoredb/config.py,sha256=7-M2c7IAv3B1AmAKizgeNn880TDBbM4gbElLfStejIU,13035
4
+ singlestoredb/config.py,sha256=t3aiWi1i3kT5VhEgXca0gwT6591YkZUed-wzvVEBMs0,13424
5
5
  singlestoredb/connection.py,sha256=Ty_idVYH50Qx-j8WXy7NeB-DYLAcpdjGYTrTHkKzG9U,47309
6
6
  singlestoredb/converters.py,sha256=6gN3_RzSbw0Aimd5cGgBNPNq1yiHb1a_NK8qC9DmOQ0,21636
7
7
  singlestoredb/exceptions.py,sha256=WCCJrNSsU-hD-621Jpd6bwmvGftQ7byXkk-XKXlaxpg,3354
8
8
  singlestoredb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  singlestoredb/pytest.py,sha256=TH364xRCN7_QaN0oRQDHixrEcDx_ZBgu3bmY0tvKrYU,9357
10
10
  singlestoredb/types.py,sha256=Lv0BEQl6aSZBiAe0OSI07FEJhcHZ9HX45iT9NU_mxHQ,10334
11
- singlestoredb/ai/__init__.py,sha256=nT048t90xqjaNhz7KJ10KfSVW4RcZRoujyC6po6Nmb8,61
12
- singlestoredb/ai/embeddings.py,sha256=KVvQY3viyYWXDBobFpj0xqiGRijt36zcHHlPNAfFAxA,770
11
+ singlestoredb/ai/__init__.py,sha256=5vlx0XpzxalMKySnVF7y40gfuCgaz7COUKqN4KfNKF8,116
12
+ singlestoredb/ai/chat.py,sha256=oDig8C8QdPEHL-JmmpdFvt_Ct7-K_D0pG_UJ00WCZ7Y,828
13
+ singlestoredb/ai/embeddings.py,sha256=2F6ALJ5Z0PKih3mt3DIFepABcC3u0lshtWu2OUXWZgg,842
13
14
  singlestoredb/alchemy/__init__.py,sha256=bUmCl1xUn2v36RMbXLIrvgKzZSqx71mp1ReUw9JeVA8,2613
14
- singlestoredb/apps/__init__.py,sha256=IKQrPKb1d_LQvmr7jXQvgPRrB5Ja_1kGAXwYvdjp6ok,120
15
+ singlestoredb/apps/__init__.py,sha256=7l4d4hCtm1ykDNf7UBi3Qnqg9N0qPs5jbQ0Al5tS5aM,173
15
16
  singlestoredb/apps/_cloud_functions.py,sha256=DMRC-4z3Q52hsKb_WlolfNcYV-5XmQGiJWbbaUxFZ0s,2794
16
- singlestoredb/apps/_config.py,sha256=kMNpkc-RtPrk_XW0kLAXeF444WIlBXzI8dLnFgIW5Jw,2184
17
- singlestoredb/apps/_connection_info.py,sha256=t8hFOSRALXt5tqvDX0fholKoT148xktE5r__SYdH6Dk,185
17
+ singlestoredb/apps/_config.py,sha256=b_Op6KjSJdPwym-AlHcy0dXLHiks1cL8Q2ea1W8r3NA,2513
18
+ singlestoredb/apps/_connection_info.py,sha256=P9rW4t2k3QFk3A34dIg9DbCWBqrcHDcZPi2Q9r2-o3A,321
18
19
  singlestoredb/apps/_dashboards.py,sha256=qEdDivjwS68Uukay0Qw-3awHZFpkcqapzd3vLaVUzWo,1521
19
20
  singlestoredb/apps/_process.py,sha256=eMiBO4piaRX1S6zdnMx0X0E4J7E1XrXndnVW0GRYq1Y,976
21
+ singlestoredb/apps/_python_udfs.py,sha256=PW-Lai3dFINsNtqrLlyUafWgs1j86qGqaNZpUD9OxVI,2811
20
22
  singlestoredb/apps/_stdout_supress.py,sha256=QRV-IHQQMvWMeJfqORuVE2-Il6ohO2Ti4IokFoTCJWE,689
21
23
  singlestoredb/apps/_uvicorn_util.py,sha256=Petkmq5keBPfXZsHBrnZfY3O2rUHvb3Cw6o-BRz5MP0,994
22
- singlestoredb/functions/__init__.py,sha256=Ehyp1pa40cvizzSYNGZ4UP4tiEcyfaxf_LI-oyt-Lro,84
23
- singlestoredb/functions/decorator.py,sha256=6c0uIknQNZrN5LAj-mWUw25Bcnl-_dRel6RMDzn2vK8,11816
24
- singlestoredb/functions/dtypes.py,sha256=5IwMSaSzxtSowxXrm5hZXW1lpNm6QILxiU4mAUEkBO0,32854
25
- singlestoredb/functions/signature.py,sha256=0d1mqH1J0cV7W1NBAqM2C98DWIZomF5qYSS5-T6OW_g,23324
24
+ singlestoredb/functions/__init__.py,sha256=KPBjRaiVipCQwTSsryHvBE_qrwy7Kj74lKnutqplcao,487
25
+ singlestoredb/functions/decorator.py,sha256=Zw4mTSzpTxFTdqfrFzdt_8hFptg0PXcrB3TbUMNynyU,5614
26
+ singlestoredb/functions/dtypes.py,sha256=7w_atIL5jAvDNtu6RDCvY440Y9U-p19_Nf7R5ki46Co,41607
27
+ singlestoredb/functions/signature.py,sha256=K1WftlfVei2xmizCxHi91z7mK8vW5VJxJAM7FiCnpEY,43926
28
+ singlestoredb/functions/typing.py,sha256=5AJG4nx-HKCeemNxL0qc1VunYPJ5lHRzpYAK_qMybNw,1380
29
+ singlestoredb/functions/utils.py,sha256=lZPxdYfHxrSfxGWCoF0YZyakVy2iYlozJ1lPSaPKRlo,11190
26
30
  singlestoredb/functions/ext/__init__.py,sha256=5ppI8IZN_zOwoJFdu_Oq9ipxtyHw9n6OMVAa_s9T_yY,24
27
31
  singlestoredb/functions/ext/arrow.py,sha256=mQhwaMpvCH_dP92WIhP_j-stu272n4UAHsFUOBTgnq0,9436
28
- singlestoredb/functions/ext/asgi.py,sha256=TNQlzosguNaM1-Rs1XXO78phav25XdKsbLTFpIvXgRA,45362
29
- singlestoredb/functions/ext/json.py,sha256=CROdj37cuJhAZ-CM93EI-SoLb4kxFcMGudsJ5QGyCoI,10831
30
- singlestoredb/functions/ext/mmap.py,sha256=zo6eweOFCZp0KIzAeL1vvuSjqvQhE8ybVhHbU0ZICt4,14124
31
- singlestoredb/functions/ext/rowdat_1.py,sha256=KYj_y5JWm3_B2-QC47HK-CNOrzujBqGUwLJfE49jwRg,23050
32
+ singlestoredb/functions/ext/asgi.py,sha256=vFX-7P7aVItK76AxBw-DjLGy0nDV9KzcJYyLsLRCsi0,53455
33
+ singlestoredb/functions/ext/json.py,sha256=j9133xOpyuSqb8smBmi_bPvv6OYCbNfpbLbEicyGqmQ,10522
34
+ singlestoredb/functions/ext/mmap.py,sha256=0BN9OyEONZ174qdZWe2m3Xykt3-QcxyLYBt2iCG772Q,14123
35
+ singlestoredb/functions/ext/rowdat_1.py,sha256=UNMMUA8mb6iIRfJV2FsdA20Sw6s-LEdHQ_tC4K4g70Q,21836
32
36
  singlestoredb/functions/ext/utils.py,sha256=OPMFD-tTCx2Kk9jguQkrTr7e4AgNkt15YsvaT1YSmN8,5480
33
37
  singlestoredb/fusion/__init__.py,sha256=FHWtrg6OJFTf6Ye197V5sU6ssryr2h6FBcDIgXP7-H4,367
34
38
  singlestoredb/fusion/graphql.py,sha256=SHqsPe4xgawdsTPHEtJGQlybYGWqPrGMmyK-v20RLac,5420
@@ -44,7 +48,7 @@ singlestoredb/fusion/handlers/stage.py,sha256=PP-SSP204lwpmnycSXXSmFPzoN535JVuwg
44
48
  singlestoredb/fusion/handlers/utils.py,sha256=nV2lSzKhv7CzM7I_uIh5kmDV0Ec6VeeKoHczx5pVNcw,11009
45
49
  singlestoredb/fusion/handlers/workspace.py,sha256=NxoEY5xd5lCQmXiim4nhAYCL0agHo1H_rGPpqa31hiw,28397
46
50
  singlestoredb/http/__init__.py,sha256=4cEDvLloGc3LSpU-PnIwacyu0n5oIIIE6xk2SPyWD_w,939
47
- singlestoredb/http/connection.py,sha256=kLA-LA4zinbNOSemRbGqbTHd3bNn-ucOwmQZa8HIKPI,41075
51
+ singlestoredb/http/connection.py,sha256=pYewBJsoMLVNw5HMtSECQWHwPQ1qf6onwz4BmQ01_TU,41156
48
52
  singlestoredb/magics/__init__.py,sha256=fqCBQ0s8o1CYE4Xo_XiSbkLDzLgMNDgpSkOx66-uDZw,1244
49
53
  singlestoredb/magics/run_personal.py,sha256=M11xHi9lWquh_pLSpFI89LGE7PhOPQOGqlSPDl48itE,1900
50
54
  singlestoredb/magics/run_shared.py,sha256=rnKpW4d8CJvD6ehK8jG8FlxuqZvjZl4KocPTsk-23O8,1805
@@ -53,11 +57,12 @@ singlestoredb/management/billing_usage.py,sha256=0UHFSPCrN0nyeGFFM-HXS3NP8pYmYo2
53
57
  singlestoredb/management/cluster.py,sha256=auBzNYIXvnI6rq3DNpPgJhwWoT6JsyZRikjpON23Pxg,14867
54
58
  singlestoredb/management/export.py,sha256=2dCvnTnkxVI-arX3_375DtWzHkI1YNK5zaFYdHKE4cs,5277
55
59
  singlestoredb/management/files.py,sha256=Z9GpS2EHf9atE8kJdz1vJtsiT80O6TV00MPhqyXfAAw,31579
60
+ singlestoredb/management/inference_api.py,sha256=9d9-7edoZ6JI3SPvStcVDOSHOY6l38V1MFpyskdLAZY,2684
56
61
  singlestoredb/management/job.py,sha256=Npfe1JLYJlggGBrXLniPKwKUKF1i3alvSY1SFtvauSs,25498
57
- singlestoredb/management/manager.py,sha256=8zU0d7NG83PYMhoAs2JriTqbqh-R2tLX7VZoeZtcogY,9148
58
- singlestoredb/management/organization.py,sha256=JBsNC4R3boUKdYvyCZyfGoVMC1mD6SPuMI1UssBVoOM,5611
62
+ singlestoredb/management/manager.py,sha256=iB4XcerOPNoFc04TN40vjosMrDhlE7HMUyHsseRgjBQ,9224
63
+ singlestoredb/management/organization.py,sha256=viFG8eLVOs-NeoL6zm8nypFRQ-oiRDD2Sk-bL2b6hvw,6095
59
64
  singlestoredb/management/region.py,sha256=oGoLLS88dE1GmY7GCc0BV7X3f7bWwKQyeXOVBFmK9Pk,1678
60
- singlestoredb/management/utils.py,sha256=BP-Wb8Sg16GbdLI_DeBz-3ttMklz6ZjYyMOz-sxElz8,13594
65
+ singlestoredb/management/utils.py,sha256=RtFhdIIliQ6aulYs99fgAQ0FxL2LfV-5oPRd9s_bBok,13626
61
66
  singlestoredb/management/workspace.py,sha256=D9DzpeWU7xFjpj8bBYiXyasjVYVANeYjTzgkz2aKvJQ,57984
62
67
  singlestoredb/mysql/__init__.py,sha256=CbpwzNUJPAmKPpIobC0-ugBta_RgHCMq7X7N75QLReY,4669
63
68
  singlestoredb/mysql/_auth.py,sha256=YaqqyvAHmeraBv3BM207rNveUVPM-mPnW20ts_ynVWg,8341
@@ -118,18 +123,19 @@ singlestoredb/tests/test_config.py,sha256=Ad0PDmCnJMOyy9f7WTKiRasSR_3mYRByUlSb7k
118
123
  singlestoredb/tests/test_connection.py,sha256=UmoNo8erkcifEMbHZl83yAaRsyh6HANRdEtY3aViOK8,122792
119
124
  singlestoredb/tests/test_dbapi.py,sha256=cNJoTEZvYG7ckcwT7xqlkJX-2TDEYGTDDU1Igucp48k,679
120
125
  singlestoredb/tests/test_exceptions.py,sha256=vscMYmdOJr0JmkTAJrNI2w0Q96Nfugjkrt5_lYnw8i0,1176
121
- singlestoredb/tests/test_ext_func.py,sha256=gQErR-wAN8BqLNG5U4pNbg4qkQEo6Re8Hd9_Ztqo1RM,38550
126
+ singlestoredb/tests/test_ext_func.py,sha256=LhuPz8o3UF7x2LNod5oZ1tlxeLvGDEUE5FnzdsIbSPs,44643
122
127
  singlestoredb/tests/test_ext_func_data.py,sha256=9kn8BWmCjkbnP6hSbFhmhcdW4OmVT-GSvBTIzFBLEys,48796
123
128
  singlestoredb/tests/test_fusion.py,sha256=S0Jk2NrcOitqM98r5fosHGbZ1sCZ2uxar5t48v-uOD0,52045
124
129
  singlestoredb/tests/test_http.py,sha256=7hwXe61hlUes3nji0MTTZweo94tJAlJ-vA5ct9geXFQ,8868
125
- singlestoredb/tests/test_management.py,sha256=EJY-JDFNS83_pM0KKJlEHoRiEZWHxjK2XWtM0YAy63U,46462
130
+ singlestoredb/tests/test_management.py,sha256=bq75vQw_Uc6qrPk-lxoSbsz6p1AkF9hzQqaXRL6vgGY,46499
126
131
  singlestoredb/tests/test_plugin.py,sha256=P1nXLnTafaHkHN-6bVbGryxTu7OWJPU9SYFZ_WQUwq8,845
127
132
  singlestoredb/tests/test_results.py,sha256=Zg1ynZFRZqalAMfNLOU5C6BDXaox6JxrKm_XZwVNFcg,6753
128
133
  singlestoredb/tests/test_types.py,sha256=YeVE6KPqlqzJke-4hbRmc8ko1E7RLHu5S8qLg04Bl5Y,4632
129
- singlestoredb/tests/test_udf.py,sha256=Hm4Egcrd3awgGQA9JS7T0yBWyNL44z8cdjvZwNL7re4,30768
134
+ singlestoredb/tests/test_udf.py,sha256=b1zOJVuhHvL_cMHYu5iJ5Cinu8gb2Rq_aaCUTaFlNZA,29553
135
+ singlestoredb/tests/test_udf_returns.py,sha256=lDx26AUKGS4V0Vxf5ePO-VcrcX0QamyWGo-tm1GNc-E,16000
130
136
  singlestoredb/tests/test_xdict.py,sha256=5ArRJqd5aNXkPK7Y6sFeRbqZ59MZ1YaGBpSlDAbBrjM,10741
131
137
  singlestoredb/tests/utils.py,sha256=WR8GFNiC0lU4tz21Y3rlbbp9Gz9WcSwp2jpUSCj7RFU,5136
132
- singlestoredb/tests/ext_funcs/__init__.py,sha256=mKa-vOh5D8M03kgKTQyvOB74X-Of0nl-mcmJBFzRW0c,9675
138
+ singlestoredb/tests/ext_funcs/__init__.py,sha256=8kGNrG2qZVcmaAc4KAatrqZYPjBXtKbOqoG7zAwMtM4,14727
133
139
  singlestoredb/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
140
  singlestoredb/utils/config.py,sha256=WVQ567ZzqzlTGueQH5fEpm5tPZuz8y7qvpEQUB-vPjk,25453
135
141
  singlestoredb/utils/convert_rows.py,sha256=gkZeZazeJvimCYEQ1FdAC-AmMDwmFGCuP6mi653bpns,1885
@@ -141,9 +147,9 @@ singlestoredb/utils/results.py,sha256=wR70LhCqlobniZf52r67zYLBOKjWHQm68NAskdRQND
141
147
  singlestoredb/utils/xdict.py,sha256=-wi1lSPTnY99fhVMBhPKJ8cCsQhNG4GMUfkEBDKYgCw,13321
142
148
  sqlx/__init__.py,sha256=4Sdn8HN-Hf8v0_wCt60DCckCg8BvgM3-9r4YVfZycRE,89
143
149
  sqlx/magic.py,sha256=6VBlotgjautjev599tHaTYOfcfOA9m6gV_-P1_Qc4lI,3622
144
- singlestoredb-1.12.4.dist-info/LICENSE,sha256=Bojenzui8aPNjlF3w4ojguDP7sTf8vFV_9Gc2UAG1sg,11542
145
- singlestoredb-1.12.4.dist-info/METADATA,sha256=K1tOPCbyAof-bQelQHIkS3dyPZ5xx-2ckWoKxUamUSs,5778
146
- singlestoredb-1.12.4.dist-info/WHEEL,sha256=UyMHzmWA0xVqVPKfTiLs2eN3OWWZUl-kQemNbpIqlKo,100
147
- singlestoredb-1.12.4.dist-info/entry_points.txt,sha256=bSLaTWB5zGjpVYPAaI46MkkDup0su-eb3uAhCNYuRV0,48
148
- singlestoredb-1.12.4.dist-info/top_level.txt,sha256=lA65Vf4qAMfg_s1oG3LEO90h4t1Z-SPDbRqkevI3bSY,40
149
- singlestoredb-1.12.4.dist-info/RECORD,,
150
+ singlestoredb-1.13.1.dist-info/LICENSE,sha256=Bojenzui8aPNjlF3w4ojguDP7sTf8vFV_9Gc2UAG1sg,11542
151
+ singlestoredb-1.13.1.dist-info/METADATA,sha256=JZVSNAL7m8xkaedZ40JWAZIWLY-yxJ_Q9IbM9jID2T4,5847
152
+ singlestoredb-1.13.1.dist-info/WHEEL,sha256=UyMHzmWA0xVqVPKfTiLs2eN3OWWZUl-kQemNbpIqlKo,100
153
+ singlestoredb-1.13.1.dist-info/entry_points.txt,sha256=bSLaTWB5zGjpVYPAaI46MkkDup0su-eb3uAhCNYuRV0,48
154
+ singlestoredb-1.13.1.dist-info/top_level.txt,sha256=lA65Vf4qAMfg_s1oG3LEO90h4t1Z-SPDbRqkevI3bSY,40
155
+ singlestoredb-1.13.1.dist-info/RECORD,,