-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy path__init__.py
More file actions
71 lines (60 loc) · 2.04 KB
/
__init__.py
File metadata and controls
71 lines (60 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python
"""
SingleStoreDB module.
Examples
--------
>>> import singlestoredb as s2
>>> conn = s2.connect('user:password@host/dbname')
>>> cur = conn.cursor()
>>> cur.execute('select * from customers')
>>> for row in cur:
... print(row)
"""
__version__ = '1.14.0'
from typing import Any
from .config import options, get_option, set_option, describe_option
from .connection import connect, apilevel, threadsafety, paramstyle
from .exceptions import (
Warning, Error, InterfaceError, DatabaseError, OperationalError,
IntegrityError, InternalError, ProgrammingError, NotSupportedError,
DataError, ManagementError,
)
from .management import (
manage_cluster, manage_workspaces, manage_files,
)
from .types import (
Date, Time, Timestamp, DateFromTicks, TimeFromTicks, TimestampFromTicks,
Binary, STRING, BINARY, NUMBER, DATETIME, ROWID,
)
from .vectorstore import (
vector_db, IndexInterface, IndexList, IndexModel, MatchTypedDict,
Metric, IndexStatsTypedDict, NamespaceStatsTypedDict, Vector,
VectorDictMetadataValue, VectorMetadataTypedDict, VectorTuple,
VectorTupleWithMetadata, DeletionProtection, AndFilter, EqFilter,
ExactMatchFilter, FilterTypedDict, GteFilter, GtFilter, InFilter,
LteFilter, LtFilter, NeFilter, NinFilter, OrFilter, SimpleFilter,
)
#
# This function is defined here to prevent the side-effect of
# attempting to load the SQLAlchemy dialect in the core SDK.
#
def create_engine(*args: Any, **kwargs: Any) -> Any:
"""
Create an SQLAlchemy engine for SingleStoreDB.
Parameters
----------
**kwargs : Any
The parameters taken here are the same as for
`sqlalchemy.create_engine`. However, this function can be
called without any parameters in order to inherit parameters
set by environment variables or parameters set in by
options in Python code.
See Also
--------
`sqlalchemy.create_engine`
Returns
-------
SQLAlchemy engine
"""
from .alchemy import create_engine
return create_engine(*args, **kwargs)