singlestoredb 1.15.6__py3-none-any.whl → 1.15.8__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.
- singlestoredb/__init__.py +1 -1
- singlestoredb/ai/__init__.py +3 -0
- singlestoredb/ai/chat.py +144 -7
- singlestoredb/ai/embeddings.py +118 -2
- singlestoredb/management/inference_api.py +4 -0
- singlestoredb/tests/test_management.py +32 -24
- {singlestoredb-1.15.6.dist-info → singlestoredb-1.15.8.dist-info}/METADATA +1 -1
- {singlestoredb-1.15.6.dist-info → singlestoredb-1.15.8.dist-info}/RECORD +12 -12
- {singlestoredb-1.15.6.dist-info → singlestoredb-1.15.8.dist-info}/LICENSE +0 -0
- {singlestoredb-1.15.6.dist-info → singlestoredb-1.15.8.dist-info}/WHEEL +0 -0
- {singlestoredb-1.15.6.dist-info → singlestoredb-1.15.8.dist-info}/entry_points.txt +0 -0
- {singlestoredb-1.15.6.dist-info → singlestoredb-1.15.8.dist-info}/top_level.txt +0 -0
singlestoredb/__init__.py
CHANGED
singlestoredb/ai/__init__.py
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
from .chat import SingleStoreChat # noqa: F401
|
|
2
|
+
from .chat import SingleStoreChatFactory # noqa: F401
|
|
1
3
|
from .chat import SingleStoreChatOpenAI # noqa: F401
|
|
2
4
|
from .embeddings import SingleStoreEmbeddings # noqa: F401
|
|
5
|
+
from .embeddings import SingleStoreEmbeddingsFactory # noqa: F401
|
singlestoredb/ai/chat.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from typing import Any
|
|
3
|
+
from typing import Callable
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from typing import Union
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from singlestoredb import manage_workspaces
|
|
5
10
|
|
|
6
11
|
try:
|
|
7
12
|
from langchain_openai import ChatOpenAI
|
|
@@ -11,30 +16,162 @@ except ImportError:
|
|
|
11
16
|
'Please install it with `pip install langchain_openai`.',
|
|
12
17
|
)
|
|
13
18
|
|
|
19
|
+
try:
|
|
20
|
+
from langchain_aws import ChatBedrockConverse
|
|
21
|
+
except ImportError:
|
|
22
|
+
raise ImportError(
|
|
23
|
+
'Could not import langchain-aws python package. '
|
|
24
|
+
'Please install it with `pip install langchain-aws`.',
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
import boto3
|
|
28
|
+
from botocore import UNSIGNED
|
|
29
|
+
from botocore.config import Config
|
|
30
|
+
|
|
14
31
|
|
|
15
32
|
class SingleStoreChatOpenAI(ChatOpenAI):
|
|
16
|
-
def __init__(self, model_name: str, **kwargs: Any):
|
|
33
|
+
def __init__(self, model_name: str, api_key: Optional[str] = None, **kwargs: Any):
|
|
17
34
|
inference_api_manger = (
|
|
18
|
-
|
|
35
|
+
manage_workspaces().organizations.current.inference_apis
|
|
19
36
|
)
|
|
20
37
|
info = inference_api_manger.get(model_name=model_name)
|
|
38
|
+
token = (
|
|
39
|
+
api_key
|
|
40
|
+
if api_key is not None
|
|
41
|
+
else os.environ.get('SINGLESTOREDB_USER_TOKEN')
|
|
42
|
+
)
|
|
21
43
|
super().__init__(
|
|
22
44
|
base_url=info.connection_url,
|
|
23
|
-
api_key=
|
|
45
|
+
api_key=token,
|
|
24
46
|
model=model_name,
|
|
25
47
|
**kwargs,
|
|
26
48
|
)
|
|
27
49
|
|
|
28
50
|
|
|
29
51
|
class SingleStoreChat(ChatOpenAI):
|
|
30
|
-
def __init__(self, model_name: str, **kwargs: Any):
|
|
52
|
+
def __init__(self, model_name: str, api_key: Optional[str] = None, **kwargs: Any):
|
|
31
53
|
inference_api_manger = (
|
|
32
|
-
|
|
54
|
+
manage_workspaces().organizations.current.inference_apis
|
|
33
55
|
)
|
|
34
56
|
info = inference_api_manger.get(model_name=model_name)
|
|
57
|
+
token = (
|
|
58
|
+
api_key
|
|
59
|
+
if api_key is not None
|
|
60
|
+
else os.environ.get('SINGLESTOREDB_USER_TOKEN')
|
|
61
|
+
)
|
|
35
62
|
super().__init__(
|
|
36
63
|
base_url=info.connection_url,
|
|
37
|
-
api_key=
|
|
64
|
+
api_key=token,
|
|
38
65
|
model=model_name,
|
|
39
66
|
**kwargs,
|
|
40
67
|
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def SingleStoreChatFactory(
|
|
71
|
+
model_name: str,
|
|
72
|
+
api_key: Optional[str] = None,
|
|
73
|
+
streaming: bool = True,
|
|
74
|
+
http_client: Optional[httpx.Client] = None,
|
|
75
|
+
obo_token_getter: Optional[Callable[[], Optional[str]]] = None,
|
|
76
|
+
**kwargs: Any,
|
|
77
|
+
) -> Union[ChatOpenAI, ChatBedrockConverse]:
|
|
78
|
+
"""Return a chat model instance (ChatOpenAI or ChatBedrockConverse).
|
|
79
|
+
"""
|
|
80
|
+
inference_api_manager = (
|
|
81
|
+
manage_workspaces().organizations.current.inference_apis
|
|
82
|
+
)
|
|
83
|
+
info = inference_api_manager.get(model_name=model_name)
|
|
84
|
+
token_env = os.environ.get('SINGLESTOREDB_USER_TOKEN')
|
|
85
|
+
token = api_key if api_key is not None else token_env
|
|
86
|
+
|
|
87
|
+
if info.hosting_platform == 'Amazon':
|
|
88
|
+
# Instantiate Bedrock client
|
|
89
|
+
cfg_kwargs = {
|
|
90
|
+
'signature_version': UNSIGNED,
|
|
91
|
+
'retries': {'max_attempts': 1, 'mode': 'standard'},
|
|
92
|
+
}
|
|
93
|
+
# Extract timeouts from http_client if provided
|
|
94
|
+
t = http_client.timeout if http_client is not None else None
|
|
95
|
+
connect_timeout = None
|
|
96
|
+
read_timeout = None
|
|
97
|
+
if t is not None:
|
|
98
|
+
if isinstance(t, httpx.Timeout):
|
|
99
|
+
if t.connect is not None:
|
|
100
|
+
connect_timeout = float(t.connect)
|
|
101
|
+
if t.read is not None:
|
|
102
|
+
read_timeout = float(t.read)
|
|
103
|
+
if connect_timeout is None and read_timeout is not None:
|
|
104
|
+
connect_timeout = read_timeout
|
|
105
|
+
if read_timeout is None and connect_timeout is not None:
|
|
106
|
+
read_timeout = connect_timeout
|
|
107
|
+
elif isinstance(t, (int, float)):
|
|
108
|
+
connect_timeout = float(t)
|
|
109
|
+
read_timeout = float(t)
|
|
110
|
+
if read_timeout is not None:
|
|
111
|
+
cfg_kwargs['read_timeout'] = read_timeout
|
|
112
|
+
if connect_timeout is not None:
|
|
113
|
+
cfg_kwargs['connect_timeout'] = connect_timeout
|
|
114
|
+
|
|
115
|
+
cfg = Config(**cfg_kwargs)
|
|
116
|
+
client = boto3.client(
|
|
117
|
+
'bedrock-runtime',
|
|
118
|
+
endpoint_url=info.connection_url,
|
|
119
|
+
region_name='us-east-1',
|
|
120
|
+
aws_access_key_id='placeholder',
|
|
121
|
+
aws_secret_access_key='placeholder',
|
|
122
|
+
config=cfg,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
def _inject_headers(request: Any, **_ignored: Any) -> None:
|
|
126
|
+
"""Inject dynamic auth/OBO headers prior to Bedrock sending."""
|
|
127
|
+
if obo_token_getter is not None:
|
|
128
|
+
obo_val = obo_token_getter()
|
|
129
|
+
if obo_val:
|
|
130
|
+
request.headers['X-S2-OBO'] = obo_val
|
|
131
|
+
if token:
|
|
132
|
+
request.headers['Authorization'] = f'Bearer {token}'
|
|
133
|
+
request.headers.pop('X-Amz-Date', None)
|
|
134
|
+
request.headers.pop('X-Amz-Security-Token', None)
|
|
135
|
+
|
|
136
|
+
emitter = client._endpoint._event_emitter
|
|
137
|
+
emitter.register_first(
|
|
138
|
+
'before-send.bedrock-runtime.Converse',
|
|
139
|
+
_inject_headers,
|
|
140
|
+
)
|
|
141
|
+
emitter.register_first(
|
|
142
|
+
'before-send.bedrock-runtime.ConverseStream',
|
|
143
|
+
_inject_headers,
|
|
144
|
+
)
|
|
145
|
+
emitter.register_first(
|
|
146
|
+
'before-send.bedrock-runtime.InvokeModel',
|
|
147
|
+
_inject_headers,
|
|
148
|
+
)
|
|
149
|
+
emitter.register_first(
|
|
150
|
+
'before-send.bedrock-runtime.InvokeModelWithResponseStream',
|
|
151
|
+
_inject_headers,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
return ChatBedrockConverse(
|
|
155
|
+
model_id=model_name,
|
|
156
|
+
endpoint_url=info.connection_url,
|
|
157
|
+
region_name='us-east-1',
|
|
158
|
+
aws_access_key_id='placeholder',
|
|
159
|
+
aws_secret_access_key='placeholder',
|
|
160
|
+
disable_streaming=not streaming,
|
|
161
|
+
client=client,
|
|
162
|
+
**kwargs,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
# OpenAI / Azure OpenAI path
|
|
166
|
+
openai_kwargs = dict(
|
|
167
|
+
base_url=info.connection_url,
|
|
168
|
+
api_key=token,
|
|
169
|
+
model=model_name,
|
|
170
|
+
streaming=streaming,
|
|
171
|
+
)
|
|
172
|
+
if http_client is not None:
|
|
173
|
+
openai_kwargs['http_client'] = http_client
|
|
174
|
+
return ChatOpenAI(
|
|
175
|
+
**openai_kwargs,
|
|
176
|
+
**kwargs,
|
|
177
|
+
)
|
singlestoredb/ai/embeddings.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from typing import Any
|
|
3
|
+
from typing import Callable
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from typing import Union
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from singlestoredb import manage_workspaces
|
|
5
10
|
|
|
6
11
|
try:
|
|
7
12
|
from langchain_openai import OpenAIEmbeddings
|
|
@@ -11,12 +16,24 @@ except ImportError:
|
|
|
11
16
|
'Please install it with `pip install langchain_openai`.',
|
|
12
17
|
)
|
|
13
18
|
|
|
19
|
+
try:
|
|
20
|
+
from langchain_aws import BedrockEmbeddings
|
|
21
|
+
except ImportError:
|
|
22
|
+
raise ImportError(
|
|
23
|
+
'Could not import langchain-aws python package. '
|
|
24
|
+
'Please install it with `pip install langchain-aws`.',
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
import boto3
|
|
28
|
+
from botocore import UNSIGNED
|
|
29
|
+
from botocore.config import Config
|
|
30
|
+
|
|
14
31
|
|
|
15
32
|
class SingleStoreEmbeddings(OpenAIEmbeddings):
|
|
16
33
|
|
|
17
34
|
def __init__(self, model_name: str, **kwargs: Any):
|
|
18
35
|
inference_api_manger = (
|
|
19
|
-
|
|
36
|
+
manage_workspaces().organizations.current.inference_apis
|
|
20
37
|
)
|
|
21
38
|
info = inference_api_manger.get(model_name=model_name)
|
|
22
39
|
super().__init__(
|
|
@@ -25,3 +42,102 @@ class SingleStoreEmbeddings(OpenAIEmbeddings):
|
|
|
25
42
|
model=model_name,
|
|
26
43
|
**kwargs,
|
|
27
44
|
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def SingleStoreEmbeddingsFactory(
|
|
48
|
+
model_name: str,
|
|
49
|
+
api_key: Optional[str] = None,
|
|
50
|
+
http_client: Optional[httpx.Client] = None,
|
|
51
|
+
obo_token_getter: Optional[Callable[[], Optional[str]]] = None,
|
|
52
|
+
**kwargs: Any,
|
|
53
|
+
) -> Union[OpenAIEmbeddings, BedrockEmbeddings]:
|
|
54
|
+
"""Return an embeddings model instance (OpenAIEmbeddings or BedrockEmbeddings).
|
|
55
|
+
"""
|
|
56
|
+
inference_api_manager = (
|
|
57
|
+
manage_workspaces().organizations.current.inference_apis
|
|
58
|
+
)
|
|
59
|
+
info = inference_api_manager.get(model_name=model_name)
|
|
60
|
+
token_env = os.environ.get('SINGLESTOREDB_USER_TOKEN')
|
|
61
|
+
token = api_key if api_key is not None else token_env
|
|
62
|
+
|
|
63
|
+
if info.hosting_platform == 'Amazon':
|
|
64
|
+
# Instantiate Bedrock client
|
|
65
|
+
cfg_kwargs = {
|
|
66
|
+
'signature_version': UNSIGNED,
|
|
67
|
+
'retries': {'max_attempts': 1, 'mode': 'standard'},
|
|
68
|
+
}
|
|
69
|
+
# Extract timeouts from http_client if provided
|
|
70
|
+
t = http_client.timeout if http_client is not None else None
|
|
71
|
+
connect_timeout = None
|
|
72
|
+
read_timeout = None
|
|
73
|
+
if t is not None:
|
|
74
|
+
if isinstance(t, httpx.Timeout):
|
|
75
|
+
if t.connect is not None:
|
|
76
|
+
connect_timeout = float(t.connect)
|
|
77
|
+
if t.read is not None:
|
|
78
|
+
read_timeout = float(t.read)
|
|
79
|
+
if connect_timeout is None and read_timeout is not None:
|
|
80
|
+
connect_timeout = read_timeout
|
|
81
|
+
if read_timeout is None and connect_timeout is not None:
|
|
82
|
+
read_timeout = connect_timeout
|
|
83
|
+
elif isinstance(t, (int, float)):
|
|
84
|
+
connect_timeout = float(t)
|
|
85
|
+
read_timeout = float(t)
|
|
86
|
+
if read_timeout is not None:
|
|
87
|
+
cfg_kwargs['read_timeout'] = read_timeout
|
|
88
|
+
if connect_timeout is not None:
|
|
89
|
+
cfg_kwargs['connect_timeout'] = connect_timeout
|
|
90
|
+
|
|
91
|
+
cfg = Config(**cfg_kwargs)
|
|
92
|
+
client = boto3.client(
|
|
93
|
+
'bedrock-runtime',
|
|
94
|
+
endpoint_url=info.connection_url,
|
|
95
|
+
region_name='us-east-1',
|
|
96
|
+
aws_access_key_id='placeholder',
|
|
97
|
+
aws_secret_access_key='placeholder',
|
|
98
|
+
config=cfg,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
def _inject_headers(request: Any, **_ignored: Any) -> None:
|
|
102
|
+
"""Inject dynamic auth/OBO headers prior to Bedrock sending."""
|
|
103
|
+
if obo_token_getter is not None:
|
|
104
|
+
obo_val = obo_token_getter()
|
|
105
|
+
if obo_val:
|
|
106
|
+
request.headers['X-S2-OBO'] = obo_val
|
|
107
|
+
if token:
|
|
108
|
+
request.headers['Authorization'] = f'Bearer {token}'
|
|
109
|
+
request.headers.pop('X-Amz-Date', None)
|
|
110
|
+
request.headers.pop('X-Amz-Security-Token', None)
|
|
111
|
+
|
|
112
|
+
emitter = client._endpoint._event_emitter
|
|
113
|
+
emitter.register_first(
|
|
114
|
+
'before-send.bedrock-runtime.InvokeModel',
|
|
115
|
+
_inject_headers,
|
|
116
|
+
)
|
|
117
|
+
emitter.register_first(
|
|
118
|
+
'before-send.bedrock-runtime.InvokeModelWithResponseStream',
|
|
119
|
+
_inject_headers,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
return BedrockEmbeddings(
|
|
123
|
+
model_id=model_name,
|
|
124
|
+
endpoint_url=info.connection_url,
|
|
125
|
+
region_name='us-east-1',
|
|
126
|
+
aws_access_key_id='placeholder',
|
|
127
|
+
aws_secret_access_key='placeholder',
|
|
128
|
+
client=client,
|
|
129
|
+
**kwargs,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
# OpenAI / Azure OpenAI path
|
|
133
|
+
openai_kwargs = dict(
|
|
134
|
+
base_url=info.connection_url,
|
|
135
|
+
api_key=token,
|
|
136
|
+
model=model_name,
|
|
137
|
+
)
|
|
138
|
+
if http_client is not None:
|
|
139
|
+
openai_kwargs['http_client'] = http_client
|
|
140
|
+
return OpenAIEmbeddings(
|
|
141
|
+
**openai_kwargs,
|
|
142
|
+
**kwargs,
|
|
143
|
+
)
|
|
@@ -23,6 +23,7 @@ class InferenceAPIInfo(object):
|
|
|
23
23
|
name: str
|
|
24
24
|
connection_url: str
|
|
25
25
|
project_id: str
|
|
26
|
+
hosting_platform: str
|
|
26
27
|
|
|
27
28
|
def __init__(
|
|
28
29
|
self,
|
|
@@ -31,12 +32,14 @@ class InferenceAPIInfo(object):
|
|
|
31
32
|
name: str,
|
|
32
33
|
connection_url: str,
|
|
33
34
|
project_id: str,
|
|
35
|
+
hosting_platform: str,
|
|
34
36
|
):
|
|
35
37
|
self.service_id = service_id
|
|
36
38
|
self.connection_url = connection_url
|
|
37
39
|
self.model_name = model_name
|
|
38
40
|
self.name = name
|
|
39
41
|
self.project_id = project_id
|
|
42
|
+
self.hosting_platform = hosting_platform
|
|
40
43
|
|
|
41
44
|
@classmethod
|
|
42
45
|
def from_dict(
|
|
@@ -62,6 +65,7 @@ class InferenceAPIInfo(object):
|
|
|
62
65
|
model_name=obj['modelName'],
|
|
63
66
|
name=obj['name'],
|
|
64
67
|
connection_url=obj['connectionURL'],
|
|
68
|
+
hosting_platform=obj['hostingPlatform'],
|
|
65
69
|
)
|
|
66
70
|
return out
|
|
67
71
|
|
|
@@ -873,12 +873,20 @@ class TestStage(unittest.TestCase):
|
|
|
873
873
|
def test_file_object(self):
|
|
874
874
|
st = self.wg.stage
|
|
875
875
|
|
|
876
|
-
|
|
877
|
-
st.mkdir('obj_test/nest_1')
|
|
876
|
+
obj_test_dir = f'obj_test_{id(self)}'
|
|
878
877
|
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
878
|
+
st.mkdir(obj_test_dir)
|
|
879
|
+
st.mkdir(f'{obj_test_dir}/nest_1')
|
|
880
|
+
|
|
881
|
+
obj_test_sql = f'obj_test_{id(self)}.sql'
|
|
882
|
+
obj_test_2_sql = f'obj_test_2_{id(self)}.sql'
|
|
883
|
+
|
|
884
|
+
f1 = st.upload_file(TEST_DIR / 'test.sql', obj_test_sql)
|
|
885
|
+
f2 = st.upload_file(
|
|
886
|
+
TEST_DIR / 'test.sql',
|
|
887
|
+
f'{obj_test_dir}/nest_1/{obj_test_sql}',
|
|
888
|
+
)
|
|
889
|
+
d2 = st.info(f'{obj_test_dir}/nest_1/')
|
|
882
890
|
|
|
883
891
|
# is_file / is_dir
|
|
884
892
|
assert not f1.is_dir()
|
|
@@ -889,17 +897,17 @@ class TestStage(unittest.TestCase):
|
|
|
889
897
|
assert not d2.is_file()
|
|
890
898
|
|
|
891
899
|
# abspath / basename / dirname / exists
|
|
892
|
-
assert f1.abspath() ==
|
|
893
|
-
assert f1.basename() ==
|
|
900
|
+
assert f1.abspath() == obj_test_sql
|
|
901
|
+
assert f1.basename() == obj_test_sql
|
|
894
902
|
assert f1.dirname() == '/'
|
|
895
903
|
assert f1.exists()
|
|
896
|
-
assert f2.abspath() == '
|
|
897
|
-
assert f2.basename() ==
|
|
898
|
-
assert f2.dirname() == '
|
|
904
|
+
assert f2.abspath() == f'{obj_test_dir}/nest_1/{obj_test_sql}'
|
|
905
|
+
assert f2.basename() == obj_test_sql
|
|
906
|
+
assert f2.dirname() == f'{obj_test_dir}/nest_1/'
|
|
899
907
|
assert f2.exists()
|
|
900
|
-
assert d2.abspath() == '
|
|
908
|
+
assert d2.abspath() == f'{obj_test_dir}/nest_1/'
|
|
901
909
|
assert d2.basename() == 'nest_1'
|
|
902
|
-
assert d2.dirname() == '
|
|
910
|
+
assert d2.dirname() == f'{obj_test_dir}/'
|
|
903
911
|
assert d2.exists()
|
|
904
912
|
|
|
905
913
|
# download
|
|
@@ -910,9 +918,9 @@ class TestStage(unittest.TestCase):
|
|
|
910
918
|
with self.assertRaises(IsADirectoryError):
|
|
911
919
|
d2.remove()
|
|
912
920
|
|
|
913
|
-
assert st.is_file(
|
|
921
|
+
assert st.is_file(obj_test_sql)
|
|
914
922
|
f1.remove()
|
|
915
|
-
assert not st.is_file(
|
|
923
|
+
assert not st.is_file(obj_test_sql)
|
|
916
924
|
|
|
917
925
|
# removedirs
|
|
918
926
|
with self.assertRaises(NotADirectoryError):
|
|
@@ -923,8 +931,8 @@ class TestStage(unittest.TestCase):
|
|
|
923
931
|
assert not st.exists(d2.path)
|
|
924
932
|
|
|
925
933
|
# rmdir
|
|
926
|
-
f1 = st.upload_file(TEST_DIR / 'test.sql',
|
|
927
|
-
d2 = st.mkdir('
|
|
934
|
+
f1 = st.upload_file(TEST_DIR / 'test.sql', obj_test_sql)
|
|
935
|
+
d2 = st.mkdir(f'{obj_test_dir}/nest_1')
|
|
928
936
|
|
|
929
937
|
assert st.exists(f1.path)
|
|
930
938
|
assert st.exists(d2.path)
|
|
@@ -937,20 +945,20 @@ class TestStage(unittest.TestCase):
|
|
|
937
945
|
|
|
938
946
|
d2.rmdir()
|
|
939
947
|
|
|
940
|
-
assert not st.exists('
|
|
941
|
-
assert not st.exists(
|
|
948
|
+
assert not st.exists(f'{obj_test_dir}/nest_1/')
|
|
949
|
+
assert not st.exists(obj_test_dir)
|
|
942
950
|
|
|
943
951
|
# mtime / ctime
|
|
944
952
|
assert f1.getmtime() > 0
|
|
945
953
|
assert f1.getctime() > 0
|
|
946
954
|
|
|
947
955
|
# rename
|
|
948
|
-
assert st.exists(
|
|
949
|
-
assert not st.exists(
|
|
950
|
-
f1.rename(
|
|
951
|
-
assert not st.exists(
|
|
952
|
-
assert st.exists(
|
|
953
|
-
assert f1.abspath() ==
|
|
956
|
+
assert st.exists(obj_test_sql)
|
|
957
|
+
assert not st.exists(obj_test_2_sql)
|
|
958
|
+
f1.rename(obj_test_2_sql)
|
|
959
|
+
assert not st.exists(obj_test_sql)
|
|
960
|
+
assert st.exists(obj_test_2_sql)
|
|
961
|
+
assert f1.abspath() == obj_test_2_sql
|
|
954
962
|
|
|
955
963
|
|
|
956
964
|
@pytest.mark.management
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
singlestoredb/__init__.py,sha256=
|
|
1
|
+
singlestoredb/__init__.py,sha256=Se5cDVTuc9ipv2VOQyvD8_zf9Bqw3XfNE1Md0L2hk7U,2272
|
|
2
2
|
singlestoredb/auth.py,sha256=u8D9tpKzrqa4ssaHjyZnGDX1q8XBpGtuoOkTkSv7B28,7599
|
|
3
3
|
singlestoredb/config.py,sha256=aBdMrPEaNSH-QLi1AXoQaSJsZ9f6ZXoFPN-74Trr6sQ,13935
|
|
4
4
|
singlestoredb/connection.py,sha256=ELk3-UpM6RaB993aIt08MydKiiDnejHQ1s8EFiacrAI,46055
|
|
@@ -8,9 +8,9 @@ singlestoredb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
8
8
|
singlestoredb/pytest.py,sha256=OyF3BO9mgxenifYhOihnzGk8WzCJ_zN5_mxe8XyFPOc,9074
|
|
9
9
|
singlestoredb/types.py,sha256=Qp_PWYjSYG6PRnmXAZZ7K2QehUqfoG4KSllI3O1stPE,10397
|
|
10
10
|
singlestoredb/vectorstore.py,sha256=BZb8e7m02_XVHqOyu8tA94R6kHb3n-BC8F08JyJwDzY,8408
|
|
11
|
-
singlestoredb/ai/__init__.py,sha256
|
|
12
|
-
singlestoredb/ai/chat.py,sha256=
|
|
13
|
-
singlestoredb/ai/embeddings.py,sha256=
|
|
11
|
+
singlestoredb/ai/__init__.py,sha256=zNSUVDzDsyIfW7-obV5iRRhDjPqgPzG_EJJaT0_jtLw,284
|
|
12
|
+
singlestoredb/ai/chat.py,sha256=EAsEyzT8jvSVYVBBf8srJG6bbx9ZcCo6CJvsifvui6k,5885
|
|
13
|
+
singlestoredb/ai/embeddings.py,sha256=gTgVfG6MKNF9B6NrM2Mz5p9Jh7uvUOczRKBO5a89udE,4831
|
|
14
14
|
singlestoredb/alchemy/__init__.py,sha256=dXRThusYrs_9GjrhPOw0-vw94in_T8yY9jE7SGCqiQk,2523
|
|
15
15
|
singlestoredb/apps/__init__.py,sha256=dfN97AZz7Np6JML3i9GJrv22ZbNCUletXmsJpQnKhKg,170
|
|
16
16
|
singlestoredb/apps/_cloud_functions.py,sha256=NJJu0uJsK9TjY3yZjgftpFPR-ga-FrOyaiDD4jWFCtE,2704
|
|
@@ -81,7 +81,7 @@ singlestoredb/management/billing_usage.py,sha256=9ighjIpcopgIyJOktBYQ6pahBZmWGHO
|
|
|
81
81
|
singlestoredb/management/cluster.py,sha256=vDefpp2IMZRawvueIqZK2pePWVNnPWb6Szrt8mO8gmg,14419
|
|
82
82
|
singlestoredb/management/export.py,sha256=yR-yZUE9USFrP5OR_5iLFqEc8GLiKDQypSEp08CmT5k,9083
|
|
83
83
|
singlestoredb/management/files.py,sha256=89IhpGw9WdwxVeksavHEDMVn9wb_jxb-utZuIDqkLHw,30477
|
|
84
|
-
singlestoredb/management/inference_api.py,sha256=
|
|
84
|
+
singlestoredb/management/inference_api.py,sha256=px4JrziJQMwG73iNnYw_95np9DDrp5zo5mKz8c5EF9o,2742
|
|
85
85
|
singlestoredb/management/job.py,sha256=4-xLWzbE8odQogVVaFer80UEoTAZY1T28VZ9Ug4rbmM,24611
|
|
86
86
|
singlestoredb/management/manager.py,sha256=k8JKPXyJVHI7gFwqIhxhUtQr_KdBCXw7Dw4GCdCtdKg,9352
|
|
87
87
|
singlestoredb/management/organization.py,sha256=_JvW0Znu5emR5uYGVEcZvakQqftNb_vRhzmkOoPRPfc,5869
|
|
@@ -153,7 +153,7 @@ singlestoredb/tests/test_ext_func.py,sha256=_YREceW1Llwx9Wcamj0up2IXLuBTnuvQqCFO
|
|
|
153
153
|
singlestoredb/tests/test_ext_func_data.py,sha256=kyNklkX1RxSiahI0LZjpqhg3LGDs0iwv8iHuXW3AcSo,47515
|
|
154
154
|
singlestoredb/tests/test_fusion.py,sha256=7YQ_nOQoV_7yD4OEpJz2Ov-zok-cBFK9IOJ3FgZ0xo0,50593
|
|
155
155
|
singlestoredb/tests/test_http.py,sha256=RXasTqBWRn__omj0eLFTJYIbZjd0PPdIV2d4Cqz0MC8,8580
|
|
156
|
-
singlestoredb/tests/test_management.py,sha256=
|
|
156
|
+
singlestoredb/tests/test_management.py,sha256=BK58UWs6L_9h1ePUNjnIJ1fVAEvBvC8rP7HtnfoANYQ,52205
|
|
157
157
|
singlestoredb/tests/test_plugin.py,sha256=qpO9wmWc62VaijN1sJ97YSYIX7I7Y5C6sY-WzwrutDQ,812
|
|
158
158
|
singlestoredb/tests/test_results.py,sha256=wg93sujwt-R9_eJCgSCElgAZhLDkIiAo3qPkPydOv78,6582
|
|
159
159
|
singlestoredb/tests/test_types.py,sha256=jqoAaSjhbgwB3vt0KsTcl7XBWoMMIa0mPFKhEi5bBjo,4500
|
|
@@ -174,9 +174,9 @@ singlestoredb/utils/results.py,sha256=bJtaUaDiFq26IsPAKZ2FHGB7csMn94EAxLKrP4HaEE
|
|
|
174
174
|
singlestoredb/utils/xdict.py,sha256=S9HKgrPrnu_6b7iOwa2KrW8CmU1Uqx0BWdEyogFzWbE,12896
|
|
175
175
|
sqlx/__init__.py,sha256=aBYiU8DZXCogvWu3yWafOz7bZS5WWwLZXj7oL0dXGyU,85
|
|
176
176
|
sqlx/magic.py,sha256=JsS9_9aBFaOt91Torm1JPN0c8qB2QmYJmNSKtbSQIY0,3509
|
|
177
|
-
singlestoredb-1.15.
|
|
178
|
-
singlestoredb-1.15.
|
|
179
|
-
singlestoredb-1.15.
|
|
180
|
-
singlestoredb-1.15.
|
|
181
|
-
singlestoredb-1.15.
|
|
182
|
-
singlestoredb-1.15.
|
|
177
|
+
singlestoredb-1.15.8.dist-info/LICENSE,sha256=Mlq78idURT-9G026aMYswwwnnrLcgzTLuXeAs5hjDLM,11341
|
|
178
|
+
singlestoredb-1.15.8.dist-info/METADATA,sha256=KoZX7f5n48b50WUX1-kXKJo0__S7K2Blbl-qsPOzMS8,5786
|
|
179
|
+
singlestoredb-1.15.8.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
180
|
+
singlestoredb-1.15.8.dist-info/entry_points.txt,sha256=bSLaTWB5zGjpVYPAaI46MkkDup0su-eb3uAhCNYuRV0,48
|
|
181
|
+
singlestoredb-1.15.8.dist-info/top_level.txt,sha256=DfFGz7bM4XrshloiCeTABgylT3BUnS8T5pJam3ewT6Q,19
|
|
182
|
+
singlestoredb-1.15.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|