singlestoredb 1.12.4__py3-none-any.whl → 1.13.1__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 singlestoredb might be problematic. Click here for more details.

Files changed (35) hide show
  1. singlestoredb/__init__.py +1 -1
  2. singlestoredb/ai/__init__.py +1 -0
  3. singlestoredb/ai/chat.py +26 -0
  4. singlestoredb/ai/embeddings.py +18 -15
  5. singlestoredb/apps/__init__.py +1 -0
  6. singlestoredb/apps/_config.py +6 -0
  7. singlestoredb/apps/_connection_info.py +8 -0
  8. singlestoredb/apps/_python_udfs.py +85 -0
  9. singlestoredb/config.py +14 -2
  10. singlestoredb/functions/__init__.py +15 -1
  11. singlestoredb/functions/decorator.py +102 -252
  12. singlestoredb/functions/dtypes.py +545 -198
  13. singlestoredb/functions/ext/asgi.py +421 -129
  14. singlestoredb/functions/ext/json.py +29 -36
  15. singlestoredb/functions/ext/mmap.py +1 -1
  16. singlestoredb/functions/ext/rowdat_1.py +50 -70
  17. singlestoredb/functions/signature.py +816 -144
  18. singlestoredb/functions/typing.py +41 -0
  19. singlestoredb/functions/utils.py +421 -0
  20. singlestoredb/http/connection.py +3 -1
  21. singlestoredb/management/inference_api.py +101 -0
  22. singlestoredb/management/manager.py +6 -1
  23. singlestoredb/management/organization.py +17 -0
  24. singlestoredb/management/utils.py +2 -2
  25. singlestoredb/tests/ext_funcs/__init__.py +476 -237
  26. singlestoredb/tests/test_ext_func.py +192 -3
  27. singlestoredb/tests/test_management.py +5 -5
  28. singlestoredb/tests/test_udf.py +101 -131
  29. singlestoredb/tests/test_udf_returns.py +459 -0
  30. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/METADATA +2 -1
  31. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/RECORD +35 -29
  32. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/LICENSE +0 -0
  33. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/WHEEL +0 -0
  34. {singlestoredb-1.12.4.dist-info → singlestoredb-1.13.1.dist-info}/entry_points.txt +0 -0
  35. {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,33 +1,37 @@
1
- singlestoredb/__init__.py,sha256=k2RhlWhHq2KGERDJKr9bjgAV5KCrLJl2vcEyfWJriGw,1649
1
+ singlestoredb/__init__.py,sha256=TlTiqjO5Ea2FP3Iq8Kmk0zAA2vR6oOj-HjURaUcQKcM,1649
2
2
  singlestoredb/auth.py,sha256=u8D9tpKzrqa4ssaHjyZnGDX1q8XBpGtuoOkTkSv7B28,7599
3
- singlestoredb/config.py,sha256=0XooNOf1dUee26C0io7unfBbdXUyfDIYc_mSpxsVsTI,12592
3
+ singlestoredb/config.py,sha256=dayUWwSy2YdgmhF8tzH-7FwFpwon5bgX_VeX-Yu5ia4,12969
4
4
  singlestoredb/connection.py,sha256=0HEpjBZXLqQwOTEfveMkgej1H3Kyof47prIHvJJZtoo,45831
5
5
  singlestoredb/converters.py,sha256=Ui-AqdW3pRAQ8A_YcK9EqVYyM4Pt1_Q-tjlotbpK6Cw,20686
6
6
  singlestoredb/exceptions.py,sha256=HuoA6sMRL5qiCiee-_5ddTGmFbYC9Euk8TYUsh5GvTw,3234
7
7
  singlestoredb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  singlestoredb/pytest.py,sha256=OyF3BO9mgxenifYhOihnzGk8WzCJ_zN5_mxe8XyFPOc,9074
9
9
  singlestoredb/types.py,sha256=FIqO1A7e0Gkk7ITmIysBy-P5S--ItbMSlYvblzqGS30,9969
10
- singlestoredb/ai/__init__.py,sha256=7Pubobzx5OlyepNo5DOOxWev1DUW9WFc9P6Qver2xpY,60
11
- singlestoredb/ai/embeddings.py,sha256=3jghE4WMf7vy8RobhrMOLvMLnDNGbkPCF48B3fGM38U,746
10
+ singlestoredb/ai/__init__.py,sha256=-uNcq-bY-AiWhZ5Plq2ZXtfIVL4PaifMJsJf58rdN8I,114
11
+ singlestoredb/ai/chat.py,sha256=8OSBZJ3J2zOlVXzJ_sHSAAyu5E6sy7jqqiNeFhtmjOI,802
12
+ singlestoredb/ai/embeddings.py,sha256=X3g0sJNDVOzXzZwoXz3M3ch-IERQXNkHxuH4cj125I8,815
12
13
  singlestoredb/alchemy/__init__.py,sha256=dXRThusYrs_9GjrhPOw0-vw94in_T8yY9jE7SGCqiQk,2523
13
- singlestoredb/apps/__init__.py,sha256=uuEH2WZ1ROpmkMBBdz1tSkQSdYR9blXXU2nn7E5P4qQ,118
14
+ singlestoredb/apps/__init__.py,sha256=dfN97AZz7Np6JML3i9GJrv22ZbNCUletXmsJpQnKhKg,170
14
15
  singlestoredb/apps/_cloud_functions.py,sha256=NJJu0uJsK9TjY3yZjgftpFPR-ga-FrOyaiDD4jWFCtE,2704
15
- singlestoredb/apps/_config.py,sha256=w21kH0jMJ0_cP_VgAxHhKiLW5Iyrr7xzUIxRmfe_fqs,2118
16
- singlestoredb/apps/_connection_info.py,sha256=gQPYzJrBQUEH76zVTkxJ7FAypNoN2T7GYHVOSgJ7Q8Q,175
16
+ singlestoredb/apps/_config.py,sha256=FlV0ABP7qlBJoKo9NOme6Fpp4yUFm5QEpHEHbl1A24o,2441
17
+ singlestoredb/apps/_connection_info.py,sha256=QOr-wcQJn6oCZw2kLEP0Uwzo85CGolGz0QIvlem3gug,303
17
18
  singlestoredb/apps/_dashboards.py,sha256=_03fI-GJannamA5lxLvIoC6Mim-H1jTRuI8-dw_P--k,1474
18
19
  singlestoredb/apps/_process.py,sha256=G37fk6bzIxzhfEqp2aJBk3JCij-T2HFtTd078k5Xq9I,944
20
+ singlestoredb/apps/_python_udfs.py,sha256=-CT0hzfHGnbxWkOKS8gQBJa3Kq6ixT_gn18TGtLtK_k,2726
19
21
  singlestoredb/apps/_stdout_supress.py,sha256=8s9zMIIRPpeu44yluJFc_0VueAxZDmr9QVGT6TGiFeY,659
20
22
  singlestoredb/apps/_uvicorn_util.py,sha256=rEK4nEmq5hbpRgsmK16UVlxe2DyQSq7C5w5WZSp0kX8,962
21
- singlestoredb/functions/__init__.py,sha256=nPaLVgtb5XDxbRucDFFwjePPh4n40_6jcbxE8HPebkQ,82
22
- singlestoredb/functions/decorator.py,sha256=0gfYVCi_GvxKcuDmAcpfIFTTElLD0CBT8RYN_dUrEvU,11485
23
- singlestoredb/functions/dtypes.py,sha256=a2vevIug8NhiUCFiSOKwRPpdWU69Gn13ZoQ6Aovskhc,31408
24
- singlestoredb/functions/signature.py,sha256=qjdCBxtJvNnDWCAruX9kFNuYuGYVCWGEJ-heKRu4MXk,22551
23
+ singlestoredb/functions/__init__.py,sha256=I2GnxOhLb4_7xhgOxdIwmwD5NiK7QYPYaE3PUIX-7xk,471
24
+ singlestoredb/functions/decorator.py,sha256=gylwivCwpNMCUmgBEUEYf2ogIpInNhu6IFeTU82W7Ko,5433
25
+ singlestoredb/functions/dtypes.py,sha256=DgJaNXouJ2t-qIqDiQlUYU9IhkXXUTigWeE_MAcmvHM,39814
26
+ singlestoredb/functions/signature.py,sha256=avErza5t3p0vy94p4yjw7Hy2cCDvjolwCyYjEI0PKXM,42481
27
+ singlestoredb/functions/typing.py,sha256=gT_Sz5YH-L-9WeIHwWYMEx-hUCZqis7ec5Ipk3JXpnM,1339
28
+ singlestoredb/functions/utils.py,sha256=1L0Phgzq0XdWK3ecfOOydq4zV955yCwpDoAaCYRGldk,10769
25
29
  singlestoredb/functions/ext/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
26
30
  singlestoredb/functions/ext/arrow.py,sha256=WB7n1ACslyd8nlbFzUvlbxn1BVuEjA9-BGBEqCWlSOo,9061
27
- singlestoredb/functions/ext/asgi.py,sha256=AK7dxe_m8TnFh7IuKKzKO1lCyfJVzs4hRJKW1vTO130,44073
28
- singlestoredb/functions/ext/json.py,sha256=XkI8jirxi1T9F-M0p9NpLezph0MRAhYmDiPuU2Id0Uo,10404
29
- singlestoredb/functions/ext/mmap.py,sha256=OB6CIYoLe_AYuJM10lE0I6QhZJ5kMhLNbQo2Sp1wiZA,13711
30
- singlestoredb/functions/ext/rowdat_1.py,sha256=JgKRsVSQYczFD6cmo2xLilbNPYpyLL2tPOWO1Gh25ow,22306
31
+ singlestoredb/functions/ext/asgi.py,sha256=CSjGB8YnBYf0Ca4qMjl25AG1ExBmmnzxKTFAogi_mDc,51874
32
+ singlestoredb/functions/ext/json.py,sha256=RIuZdDybEdHuC-f2p6BdjhFjM3iGb3a1PRQ4k11P6N8,10102
33
+ singlestoredb/functions/ext/mmap.py,sha256=RzyNSLRpI5ZJ8YN6k-AvZlRTLjj80j52byHLtW8c3ps,13710
34
+ singlestoredb/functions/ext/rowdat_1.py,sha256=SlXbJ2042jEoaXw81y5llw1625w0aU2nZ8vI_O3qA-M,21112
31
35
  singlestoredb/functions/ext/utils.py,sha256=2-B8YU_Iekv8JcpI-ochs9TIeuyatLaLAH-AyYyUUIg,5311
32
36
  singlestoredb/fusion/__init__.py,sha256=Qo7SuqGw-l-vE8-EI2jhm6hXJkYfOLUKIws9c7LFNX0,356
33
37
  singlestoredb/fusion/graphql.py,sha256=ZA3HcDq5rER-dCEavwTqnF7KM0D2LCYIY7nLQk7lSso,5207
@@ -43,7 +47,7 @@ singlestoredb/fusion/handlers/stage.py,sha256=kYVjbPys83kf3jX6jWwN8Ju0oEocKVZ3TI
43
47
  singlestoredb/fusion/handlers/utils.py,sha256=ozHOWUraoN8XGTK9JZdhv5HV8AQR8zfUd1yh1kLvUXY,10685
44
48
  singlestoredb/fusion/handlers/workspace.py,sha256=4xN2TFO4yF7KZB2Fcht7IuvoDdAT6fDfDLjixiHZN8w,27506
45
49
  singlestoredb/http/__init__.py,sha256=A_2ZUCCpvRYIA6YDpPy57wL5R1eZ5SfP6I1To5nfJ2s,912
46
- singlestoredb/http/connection.py,sha256=dNn6OAjCSueR_CIv1T28oDr_TkqXUV05yv1t-XoPrYE,39814
50
+ singlestoredb/http/connection.py,sha256=EgE2m_nxisGPo6YV3AJd-RRafdT0f70HRbIo1ONQ668,39893
47
51
  singlestoredb/magics/__init__.py,sha256=lZjkT3Webo9c1EQAzlRCRh6B2pckQH8uvNrrB__abcI,1210
48
52
  singlestoredb/magics/run_personal.py,sha256=2f7u1T7iblxGzZurHNgNXLrPBvsvPADZKo_RD_IjYuE,1844
49
53
  singlestoredb/magics/run_shared.py,sha256=SI8dCBRMaGn-xZU7dto4jsAqKBi-Ll14htUsMUSBpJM,1752
@@ -52,11 +56,12 @@ singlestoredb/management/billing_usage.py,sha256=9ighjIpcopgIyJOktBYQ6pahBZmWGHO
52
56
  singlestoredb/management/cluster.py,sha256=h75grXSxq4Anr4RxwKxcZW4TkWJ4bFg_ql5iRWCNLdQ,14405
53
57
  singlestoredb/management/export.py,sha256=jJCe25ecH_LzKSDc7vS1-5DQaWFrZipeawLPpArByJE,5108
54
58
  singlestoredb/management/files.py,sha256=89IhpGw9WdwxVeksavHEDMVn9wb_jxb-utZuIDqkLHw,30477
59
+ singlestoredb/management/inference_api.py,sha256=L6eFqaUaPugF_cmrZ4xlArj8CIv25vWqQs1vwgKPEF4,2583
55
60
  singlestoredb/management/job.py,sha256=4-xLWzbE8odQogVVaFer80UEoTAZY1T28VZ9Ug4rbmM,24611
56
- singlestoredb/management/manager.py,sha256=X29VEHlUEzmWvGo_bQMzo8a6d4nYMLE1CewlNBjrD7M,8851
57
- singlestoredb/management/organization.py,sha256=hqMaM7H-naMjNbxDl_f7G_2o5TkiGKyzPhxuzDveJAw,5402
61
+ singlestoredb/management/manager.py,sha256=V9_PVMpUOj8laKwNFtp4Nd2Taww2Y65TeSRK5ZWzOo0,8922
62
+ singlestoredb/management/organization.py,sha256=_JvW0Znu5emR5uYGVEcZvakQqftNb_vRhzmkOoPRPfc,5869
58
63
  singlestoredb/management/region.py,sha256=HnLcWUh7r_aLECliplCDHak4a_F3B7LOSXEYMW66qD0,1611
59
- singlestoredb/management/utils.py,sha256=P4fp8a7EwaYiag_hvpILcgwXtdFNYKKO70dsKjmxn1A,13171
64
+ singlestoredb/management/utils.py,sha256=QIhZCZSRaDbAG35xu1_n7ihmRXON8swc-gEK2FGYutI,13203
60
65
  singlestoredb/management/workspace.py,sha256=ze-eE-cO3JCrR3uttVFaBOndDbEE8_qWR2kzOjzbKaY,56234
61
66
  singlestoredb/mysql/__init__.py,sha256=olUTAvkiERhDW41JXQMawkg-i0tvBEkoTkII1tt6lxU,4492
62
67
  singlestoredb/mysql/_auth.py,sha256=AugRitoUwgRIDFuJxuAH4MWIAmckY7Ji2pP6r_Ng9dY,8043
@@ -117,18 +122,19 @@ singlestoredb/tests/test_config.py,sha256=63lyIQ2KrvGE6C9403B_4Mc90mX4tp42ys5Bih
117
122
  singlestoredb/tests/test_connection.py,sha256=fvn-kPdeIMI9RGNz0dNk5ZmTCep1amwWQDHYfPdqO60,119699
118
123
  singlestoredb/tests/test_dbapi.py,sha256=IKq5Hcwx8WikASP8_AB5fo3TXv7ryWPCVGonoly00gI,652
119
124
  singlestoredb/tests/test_exceptions.py,sha256=tfr_8X2w1UmG4nkSBzWGB0C7ehrf1GAVgj6_ODaG-TM,1131
120
- singlestoredb/tests/test_ext_func.py,sha256=OWd-CJ1Owhx72nikSWWEF2EQFCJk7vEXZM2Oy9EbYQo,37357
125
+ singlestoredb/tests/test_ext_func.py,sha256=s1k1cBxQ7vIS1zSrKGkKTgLZE1DT_Rqj-3VNSCSv68I,43261
121
126
  singlestoredb/tests/test_ext_func_data.py,sha256=yTADD93nPxX6_rZXXLZaOWEI_yPvYyir9psn5PK9ctU,47695
122
127
  singlestoredb/tests/test_fusion.py,sha256=EH1mRwdX2Fajsq6x2l0gBhH1YhcxtvDGIKC9HJ4sDbQ,50521
123
128
  singlestoredb/tests/test_http.py,sha256=RXasTqBWRn__omj0eLFTJYIbZjd0PPdIV2d4Cqz0MC8,8580
124
- singlestoredb/tests/test_management.py,sha256=9WKaFChAWkKMm0kDhwTgjaJIAcga7mQZiF0x9BNI1Tc,45112
129
+ singlestoredb/tests/test_management.py,sha256=6evsyQWA-lOKMehJi8xvjp0udm85EHBHuZDHwQEzxPg,45149
125
130
  singlestoredb/tests/test_plugin.py,sha256=qpO9wmWc62VaijN1sJ97YSYIX7I7Y5C6sY-WzwrutDQ,812
126
131
  singlestoredb/tests/test_results.py,sha256=wg93sujwt-R9_eJCgSCElgAZhLDkIiAo3qPkPydOv78,6582
127
132
  singlestoredb/tests/test_types.py,sha256=jqoAaSjhbgwB3vt0KsTcl7XBWoMMIa0mPFKhEi5bBjo,4500
128
- singlestoredb/tests/test_udf.py,sha256=G6MgAzu5ZiMHmtHaGbWYXRZ-naEvwYzT5MRB900BU3I,30029
133
+ singlestoredb/tests/test_udf.py,sha256=Kb7-oJpnN6MTT3aE5V5dry_r5ze0EwaAIJeh_zR3l0I,28844
134
+ singlestoredb/tests/test_udf_returns.py,sha256=k31L6Ir2Xw8MEZ18upuu0p_D_OpbrPAzWhDQXVFDS7I,15541
129
135
  singlestoredb/tests/test_xdict.py,sha256=fqHspoi39nbX3fIDVkkRXcd5H50xdOsSvK0bxAMQnaE,10408
130
136
  singlestoredb/tests/utils.py,sha256=2A2tEdD3t8aXWUnHtAIcFlWrflsz2MlMcCbUDaAG29c,4995
131
- singlestoredb/tests/ext_funcs/__init__.py,sha256=qZLnDI_Ck0tguVi-K-BKXDHAcC0jui3dsm93Djj4x08,9290
137
+ singlestoredb/tests/ext_funcs/__init__.py,sha256=gtyhykoEk8_-il5ukTwvqDu-4D1LgwxMFseYg1wgOHo,14103
132
138
  singlestoredb/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
139
  singlestoredb/utils/config.py,sha256=m3Xn6hsbdKyLufSnbokhFJ9Vfaz9Qpkj1IEnIiH9oJQ,24503
134
140
  singlestoredb/utils/convert_rows.py,sha256=A6up7a8Bq-eV2BXdGCotQviqp1Q7XdJ2MA9339hLYVQ,1816
@@ -140,9 +146,9 @@ singlestoredb/utils/results.py,sha256=bJtaUaDiFq26IsPAKZ2FHGB7csMn94EAxLKrP4HaEE
140
146
  singlestoredb/utils/xdict.py,sha256=S9HKgrPrnu_6b7iOwa2KrW8CmU1Uqx0BWdEyogFzWbE,12896
141
147
  sqlx/__init__.py,sha256=aBYiU8DZXCogvWu3yWafOz7bZS5WWwLZXj7oL0dXGyU,85
142
148
  sqlx/magic.py,sha256=JsS9_9aBFaOt91Torm1JPN0c8qB2QmYJmNSKtbSQIY0,3509
143
- singlestoredb-1.12.4.dist-info/LICENSE,sha256=Mlq78idURT-9G026aMYswwwnnrLcgzTLuXeAs5hjDLM,11341
144
- singlestoredb-1.12.4.dist-info/METADATA,sha256=YmOcqvh_bJwEzfcaVM-lG6ane49lQwXy2TJdl0t42Rc,5622
145
- singlestoredb-1.12.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
146
- singlestoredb-1.12.4.dist-info/entry_points.txt,sha256=bSLaTWB5zGjpVYPAaI46MkkDup0su-eb3uAhCNYuRV0,48
147
- singlestoredb-1.12.4.dist-info/top_level.txt,sha256=DfFGz7bM4XrshloiCeTABgylT3BUnS8T5pJam3ewT6Q,19
148
- singlestoredb-1.12.4.dist-info/RECORD,,
149
+ singlestoredb-1.13.1.dist-info/LICENSE,sha256=Mlq78idURT-9G026aMYswwwnnrLcgzTLuXeAs5hjDLM,11341
150
+ singlestoredb-1.13.1.dist-info/METADATA,sha256=rybhqtR5TzE7p-keWvO6V21MlYNZZtIULT9atDRgXpw,5688
151
+ singlestoredb-1.13.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
152
+ singlestoredb-1.13.1.dist-info/entry_points.txt,sha256=bSLaTWB5zGjpVYPAaI46MkkDup0su-eb3uAhCNYuRV0,48
153
+ singlestoredb-1.13.1.dist-info/top_level.txt,sha256=DfFGz7bM4XrshloiCeTABgylT3BUnS8T5pJam3ewT6Q,19
154
+ singlestoredb-1.13.1.dist-info/RECORD,,