thoth-dbmanager 0.5.0__py3-none-any.whl → 0.5.2__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.
- thoth_dbmanager/adapters/__init__.py +0 -6
- thoth_dbmanager/core/factory.py +0 -16
- thoth_dbmanager/core/interfaces.py +81 -0
- thoth_dbmanager/dynamic_imports.py +0 -9
- thoth_dbmanager/plugins/__init__.py +0 -6
- thoth_dbmanager/plugins/sqlite.py +1 -0
- {thoth_dbmanager-0.5.0.dist-info → thoth_dbmanager-0.5.2.dist-info}/METADATA +232 -26
- {thoth_dbmanager-0.5.0.dist-info → thoth_dbmanager-0.5.2.dist-info}/RECORD +11 -17
- thoth_dbmanager/adapters/mysql.py +0 -165
- thoth_dbmanager/adapters/oracle.py +0 -554
- thoth_dbmanager/adapters/supabase.py +0 -249
- thoth_dbmanager/plugins/mysql.py +0 -408
- thoth_dbmanager/plugins/oracle.py +0 -150
- thoth_dbmanager/plugins/supabase.py +0 -224
- {thoth_dbmanager-0.5.0.dist-info → thoth_dbmanager-0.5.2.dist-info}/WHEEL +0 -0
- {thoth_dbmanager-0.5.0.dist-info → thoth_dbmanager-0.5.2.dist-info}/licenses/LICENSE +0 -0
- {thoth_dbmanager-0.5.0.dist-info → thoth_dbmanager-0.5.2.dist-info}/top_level.txt +0 -0
@@ -4,18 +4,12 @@ Database adapters for Thoth SQL Database Manager.
|
|
4
4
|
|
5
5
|
from .postgresql import PostgreSQLAdapter
|
6
6
|
from .sqlite import SQLiteAdapter
|
7
|
-
from .supabase import SupabaseAdapter
|
8
|
-
from .mysql import MySQLAdapter
|
9
7
|
from .mariadb import MariaDBAdapter
|
10
8
|
from .sqlserver import SQLServerAdapter
|
11
|
-
from .oracle import OracleAdapter
|
12
9
|
|
13
10
|
__all__ = [
|
14
11
|
"PostgreSQLAdapter",
|
15
12
|
"SQLiteAdapter",
|
16
|
-
"SupabaseAdapter",
|
17
|
-
"MySQLAdapter",
|
18
13
|
"MariaDBAdapter",
|
19
14
|
"SQLServerAdapter",
|
20
|
-
"OracleAdapter",
|
21
15
|
]
|
thoth_dbmanager/core/factory.py
CHANGED
@@ -124,18 +124,10 @@ class ThothDbFactory:
|
|
124
124
|
"required": ["host", "port", "database", "user", "password"],
|
125
125
|
"optional": ["schema", "sslmode", "connect_timeout"]
|
126
126
|
},
|
127
|
-
"supabase": {
|
128
|
-
"required": ["host", "port", "database", "user", "password"],
|
129
|
-
"optional": ["schema", "sslmode", "connect_timeout", "project_url", "api_key", "use_rest_api"]
|
130
|
-
},
|
131
127
|
"sqlite": {
|
132
128
|
"required": ["database_path"],
|
133
129
|
"optional": ["timeout", "check_same_thread"]
|
134
130
|
},
|
135
|
-
"mysql": {
|
136
|
-
"required": ["host", "port", "database", "user", "password"],
|
137
|
-
"optional": ["charset", "autocommit", "connect_timeout"]
|
138
|
-
},
|
139
131
|
"mariadb": {
|
140
132
|
"required": ["host", "port", "database", "user", "password"],
|
141
133
|
"optional": ["charset", "autocommit", "connect_timeout"]
|
@@ -143,14 +135,6 @@ class ThothDbFactory:
|
|
143
135
|
"sqlserver": {
|
144
136
|
"required": ["server", "database", "user", "password"],
|
145
137
|
"optional": ["driver", "trusted_connection", "timeout"]
|
146
|
-
},
|
147
|
-
"oracle": {
|
148
|
-
"required": ["host", "port", "service_name", "user", "password"],
|
149
|
-
"optional": ["encoding", "nencoding", "threaded"]
|
150
|
-
},
|
151
|
-
"informix": {
|
152
|
-
"required": ["server", "database", "host", "user", "password"],
|
153
|
-
"optional": ["protocol", "service", "timeout"]
|
154
138
|
}
|
155
139
|
}
|
156
140
|
|
@@ -279,3 +279,84 @@ class DbPlugin(ABC):
|
|
279
279
|
if not self.adapter:
|
280
280
|
raise RuntimeError("Plugin not initialized")
|
281
281
|
return self.adapter.get_unique_values()
|
282
|
+
|
283
|
+
def get_embedding_function(self):
|
284
|
+
"""
|
285
|
+
Get the embedding function for similarity computations.
|
286
|
+
|
287
|
+
Returns:
|
288
|
+
SafeSentenceTransformer: An embedding function with encode method
|
289
|
+
"""
|
290
|
+
try:
|
291
|
+
# Import SafeSentenceTransformer
|
292
|
+
try:
|
293
|
+
from sentence_transformers import SentenceTransformer
|
294
|
+
import logging
|
295
|
+
|
296
|
+
logger = logging.getLogger(__name__)
|
297
|
+
|
298
|
+
class SafeSentenceTransformer:
|
299
|
+
"""
|
300
|
+
Wrapper for SentenceTransformer that handles PyTorch meta tensor issues.
|
301
|
+
"""
|
302
|
+
def __init__(self, model_name_or_path: str):
|
303
|
+
self.model_name_or_path = model_name_or_path
|
304
|
+
self._model = None
|
305
|
+
|
306
|
+
def _get_model(self):
|
307
|
+
"""Lazy initialization of the SentenceTransformer model."""
|
308
|
+
if self._model is None:
|
309
|
+
try:
|
310
|
+
logger.info(f"Initializing SentenceTransformer with model: {self.model_name_or_path}")
|
311
|
+
self._model = SentenceTransformer(
|
312
|
+
model_name_or_path=self.model_name_or_path,
|
313
|
+
device='cpu' # Explicitly set device to CPU to avoid meta tensor issues
|
314
|
+
)
|
315
|
+
logger.info("SentenceTransformer initialized successfully")
|
316
|
+
except Exception as e:
|
317
|
+
logger.error(f"Failed to initialize SentenceTransformer: {e}")
|
318
|
+
# Try alternative initialization approach
|
319
|
+
try:
|
320
|
+
logger.info("Trying alternative initialization approach...")
|
321
|
+
self._model = SentenceTransformer(self.model_name_or_path)
|
322
|
+
# Move to CPU explicitly after initialization
|
323
|
+
self._model = self._model.to('cpu')
|
324
|
+
logger.info("Alternative initialization successful")
|
325
|
+
except Exception as e2:
|
326
|
+
logger.error(f"Alternative initialization also failed: {e2}")
|
327
|
+
raise e2
|
328
|
+
return self._model
|
329
|
+
|
330
|
+
def encode(self, sentences, **kwargs):
|
331
|
+
"""Encode sentences using the underlying SentenceTransformer model."""
|
332
|
+
model = self._get_model()
|
333
|
+
return model.encode(sentences, **kwargs)
|
334
|
+
|
335
|
+
return SafeSentenceTransformer(
|
336
|
+
model_name_or_path="paraphrase-multilingual-MiniLM-L12-v2"
|
337
|
+
)
|
338
|
+
|
339
|
+
except ImportError:
|
340
|
+
import logging
|
341
|
+
logger = logging.getLogger(__name__)
|
342
|
+
logger.warning("sentence_transformers not available, creating dummy embedding function")
|
343
|
+
# Create a dummy embedding function for testing
|
344
|
+
class DummyEmbeddingFunction:
|
345
|
+
def encode(self, sentences, **kwargs):
|
346
|
+
import numpy as np
|
347
|
+
# Return dummy embeddings - same shape for all sentences
|
348
|
+
return np.random.rand(len(sentences), 384) # 384 is typical embedding size
|
349
|
+
|
350
|
+
return DummyEmbeddingFunction()
|
351
|
+
|
352
|
+
except Exception as e:
|
353
|
+
import logging
|
354
|
+
logger = logging.getLogger(__name__)
|
355
|
+
logger.error(f"Failed to create embedding function: {e}")
|
356
|
+
# Return a basic dummy function as fallback
|
357
|
+
class BasicDummyEmbeddingFunction:
|
358
|
+
def encode(self, sentences, **kwargs):
|
359
|
+
import numpy as np
|
360
|
+
return np.random.rand(len(sentences), 384)
|
361
|
+
|
362
|
+
return BasicDummyEmbeddingFunction()
|
@@ -10,11 +10,8 @@ import warnings
|
|
10
10
|
# Mapping of database names to their required packages
|
11
11
|
DATABASE_DEPENDENCIES = {
|
12
12
|
'postgresql': ['psycopg2'],
|
13
|
-
'mysql': ['mysql.connector'],
|
14
13
|
'mariadb': ['mariadb'],
|
15
14
|
'sqlserver': ['pyodbc'],
|
16
|
-
'oracle': ['cx_Oracle'],
|
17
|
-
'supabase': ['supabase', 'postgrest', 'gotrue'],
|
18
15
|
'sqlite': [], # Built into Python
|
19
16
|
}
|
20
17
|
|
@@ -23,22 +20,16 @@ DATABASE_DEPENDENCIES = {
|
|
23
20
|
# Mapping of database names to their adapter classes
|
24
21
|
DATABASE_ADAPTERS = {
|
25
22
|
'postgresql': 'thoth_dbmanager.adapters.postgresql.PostgreSQLAdapter',
|
26
|
-
'mysql': 'thoth_dbmanager.adapters.mysql.MySQLAdapter',
|
27
23
|
'mariadb': 'thoth_dbmanager.adapters.mariadb.MariaDBAdapter',
|
28
24
|
'sqlserver': 'thoth_dbmanager.adapters.sqlserver.SQLServerAdapter',
|
29
|
-
'oracle': 'thoth_dbmanager.adapters.oracle.OracleAdapter',
|
30
|
-
'supabase': 'thoth_dbmanager.adapters.supabase.SupabaseAdapter',
|
31
25
|
'sqlite': 'thoth_dbmanager.adapters.sqlite.SQLiteAdapter',
|
32
26
|
}
|
33
27
|
|
34
28
|
# Mapping of database names to their plugin classes
|
35
29
|
DATABASE_PLUGINS = {
|
36
30
|
'postgresql': 'thoth_dbmanager.plugins.postgresql.PostgreSQLPlugin',
|
37
|
-
'mysql': 'thoth_dbmanager.plugins.mysql.MySQLPlugin',
|
38
31
|
'mariadb': 'thoth_dbmanager.plugins.mariadb.MariaDBPlugin',
|
39
32
|
'sqlserver': 'thoth_dbmanager.plugins.sqlserver.SQLServerPlugin',
|
40
|
-
'oracle': 'thoth_dbmanager.plugins.oracle.OraclePlugin',
|
41
|
-
'supabase': 'thoth_dbmanager.plugins.supabase.SupabasePlugin',
|
42
33
|
'sqlite': 'thoth_dbmanager.plugins.sqlite.SQLitePlugin',
|
43
34
|
}
|
44
35
|
|
@@ -5,19 +5,13 @@ Database plugins for Thoth SQL Database Manager.
|
|
5
5
|
# Import all plugins to ensure they are registered
|
6
6
|
from .postgresql import PostgreSQLPlugin
|
7
7
|
from .sqlite import SQLitePlugin
|
8
|
-
from .supabase import SupabasePlugin
|
9
|
-
from .mysql import MySQLPlugin
|
10
8
|
from .mariadb import MariaDBPlugin
|
11
9
|
from .sqlserver import SQLServerPlugin
|
12
|
-
from .oracle import OraclePlugin
|
13
10
|
|
14
11
|
# This ensures all plugins are registered when the module is imported
|
15
12
|
__all__ = [
|
16
13
|
"PostgreSQLPlugin",
|
17
14
|
"SQLitePlugin",
|
18
|
-
"SupabasePlugin",
|
19
|
-
"MySQLPlugin",
|
20
15
|
"MariaDBPlugin",
|
21
16
|
"SQLServerPlugin",
|
22
|
-
"OraclePlugin",
|
23
17
|
]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: thoth_dbmanager
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.2
|
4
4
|
Summary: A Python library for managing SQL databases with support for multiple database types, LSH-based similarity search, and a modern plugin architecture.
|
5
5
|
Author-email: Marco Pancotti <mp@tylconsulting.it>
|
6
6
|
Project-URL: Homepage, https://github.com/mptyl/thoth_dbmanager
|
@@ -9,7 +9,6 @@ Project-URL: Documentation, https://github.com/mptyl/thoth_dbmanager#readme
|
|
9
9
|
Project-URL: Source Code, https://github.com/mptyl/thoth_dbmanager
|
10
10
|
Keywords: database,sql,lsh,similarity-search,orm
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
|
-
Classifier: Programming Language :: Python :: 3.8
|
13
12
|
Classifier: Programming Language :: Python :: 3.9
|
14
13
|
Classifier: Programming Language :: Python :: 3.10
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
@@ -20,7 +19,7 @@ Classifier: Intended Audience :: Developers
|
|
20
19
|
Classifier: Topic :: Database
|
21
20
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
22
21
|
Classifier: Development Status :: 4 - Beta
|
23
|
-
Requires-Python: >=3.
|
22
|
+
Requires-Python: >=3.9
|
24
23
|
Description-Content-Type: text/markdown
|
25
24
|
License-File: LICENSE
|
26
25
|
Requires-Dist: datasketch>=1.5.0
|
@@ -31,30 +30,20 @@ Requires-Dist: pandas>=1.3.0
|
|
31
30
|
Requires-Dist: requests>=2.25.0
|
32
31
|
Provides-Extra: postgresql
|
33
32
|
Requires-Dist: psycopg2-binary>=2.9.0; extra == "postgresql"
|
34
|
-
Provides-Extra: mysql
|
35
|
-
Requires-Dist: mysql-connector-python>=8.0.0; extra == "mysql"
|
36
33
|
Provides-Extra: mariadb
|
37
34
|
Requires-Dist: mariadb>=1.1.0; extra == "mariadb"
|
38
35
|
Provides-Extra: sqlserver
|
39
36
|
Requires-Dist: pyodbc>=4.0.0; extra == "sqlserver"
|
40
|
-
Requires-Dist: pymssql>=2.3.0; extra == "sqlserver"
|
41
|
-
Provides-Extra: oracle
|
42
|
-
Requires-Dist: cx_Oracle>=8.3.0; extra == "oracle"
|
43
|
-
Requires-Dist: oracledb>=3.0.0; extra == "oracle"
|
44
|
-
Provides-Extra: supabase
|
45
|
-
Requires-Dist: supabase>=2.0.0; extra == "supabase"
|
46
|
-
Requires-Dist: postgrest-py>=0.10.0; extra == "supabase"
|
47
|
-
Requires-Dist: gotrue>=1.0.0; extra == "supabase"
|
48
37
|
Provides-Extra: sqlite
|
38
|
+
Provides-Extra: embeddings
|
39
|
+
Requires-Dist: sentence-transformers>=2.0.0; extra == "embeddings"
|
40
|
+
Requires-Dist: numpy>=1.21.0; extra == "embeddings"
|
49
41
|
Provides-Extra: all
|
50
42
|
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all"
|
51
|
-
Requires-Dist: mysql-connector-python>=8.0.0; extra == "all"
|
52
43
|
Requires-Dist: mariadb>=1.1.0; extra == "all"
|
53
44
|
Requires-Dist: pyodbc>=4.0.0; extra == "all"
|
54
|
-
Requires-Dist:
|
55
|
-
Requires-Dist:
|
56
|
-
Requires-Dist: oracledb>=3.0.0; extra == "all"
|
57
|
-
Requires-Dist: supabase>=2.0.0; extra == "all"
|
45
|
+
Requires-Dist: sentence-transformers>=2.0.0; extra == "all"
|
46
|
+
Requires-Dist: numpy>=1.21.0; extra == "all"
|
58
47
|
Provides-Extra: dev
|
59
48
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
60
49
|
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
@@ -69,9 +58,12 @@ Requires-Dist: docker>=6.0.0; extra == "dev"
|
|
69
58
|
Provides-Extra: test-postgresql
|
70
59
|
Requires-Dist: pytest>=7.0.0; extra == "test-postgresql"
|
71
60
|
Requires-Dist: psycopg2-binary>=2.9.0; extra == "test-postgresql"
|
72
|
-
Provides-Extra: test-
|
73
|
-
Requires-Dist: pytest>=7.0.0; extra == "test-
|
74
|
-
Requires-Dist:
|
61
|
+
Provides-Extra: test-mariadb
|
62
|
+
Requires-Dist: pytest>=7.0.0; extra == "test-mariadb"
|
63
|
+
Requires-Dist: mariadb>=1.1.0; extra == "test-mariadb"
|
64
|
+
Provides-Extra: test-sqlserver
|
65
|
+
Requires-Dist: pytest>=7.0.0; extra == "test-sqlserver"
|
66
|
+
Requires-Dist: pyodbc>=4.0.0; extra == "test-sqlserver"
|
75
67
|
Dynamic: license-file
|
76
68
|
|
77
69
|
# Thoth Database Manager
|
@@ -88,8 +80,79 @@ A Python library for managing SQL databases with support for multiple database t
|
|
88
80
|
|
89
81
|
## Installation
|
90
82
|
|
83
|
+
### Basic Installation
|
84
|
+
|
85
|
+
```bash
|
86
|
+
uv add thoth-dbmanager
|
87
|
+
```
|
88
|
+
|
89
|
+
### Installation with Database Support
|
90
|
+
|
91
|
+
To use specific databases, you'll need to install the corresponding database drivers. You can install them individually or use our convenience extras:
|
92
|
+
|
93
|
+
#### Install with All Database Support
|
94
|
+
|
95
|
+
```bash
|
96
|
+
uv add thoth-dbmanager[all]
|
97
|
+
```
|
98
|
+
|
99
|
+
#### Install with Specific Database Support
|
100
|
+
|
101
|
+
**PostgreSQL:**
|
102
|
+
|
103
|
+
```bash
|
104
|
+
uv add thoth-dbmanager[postgresql]
|
105
|
+
# or manually: uv add psycopg2-binary
|
106
|
+
```
|
107
|
+
|
108
|
+
**MySQL:**
|
109
|
+
|
110
|
+
```bash
|
111
|
+
uv add thoth-dbmanager[mysql]
|
112
|
+
# or manually: uv add mysql-connector-python
|
113
|
+
```
|
114
|
+
|
115
|
+
**MariaDB:**
|
116
|
+
|
117
|
+
```bash
|
118
|
+
uv add thoth-dbmanager[mariadb]
|
119
|
+
# or manually: uv add mariadb
|
120
|
+
```
|
121
|
+
|
122
|
+
**SQL Server:**
|
123
|
+
|
124
|
+
```bash
|
125
|
+
uv add thoth-dbmanager[sqlserver]
|
126
|
+
# or manually: uv add pyodbc
|
127
|
+
```
|
128
|
+
|
129
|
+
**Oracle:**
|
130
|
+
|
131
|
+
```bash
|
132
|
+
uv add thoth-dbmanager[oracle]
|
133
|
+
# or manually: uv add cx_Oracle
|
134
|
+
```
|
135
|
+
|
136
|
+
**Informix:**
|
137
|
+
|
138
|
+
```bash
|
139
|
+
uv add thoth-dbmanager[informix]
|
140
|
+
# or manually: uv add IfxPy
|
141
|
+
```
|
142
|
+
|
143
|
+
**Supabase:**
|
144
|
+
|
91
145
|
```bash
|
92
|
-
|
146
|
+
uv add thoth-dbmanager[supabase]
|
147
|
+
# or manually: uv add supabase gotrue
|
148
|
+
```
|
149
|
+
|
150
|
+
**SQLite** is supported out of the box (no additional drivers needed).
|
151
|
+
|
152
|
+
#### Development Installation
|
153
|
+
|
154
|
+
```bash
|
155
|
+
uv add thoth-dbmanager[dev]
|
93
156
|
```
|
94
157
|
|
95
158
|
## Quick Start
|
@@ -278,9 +341,17 @@ if hasattr(manager, 'get_columns_as_documents'):
|
|
278
341
|
print(f"Primary Key: {doc.is_pk}")
|
279
342
|
```
|
280
343
|
|
281
|
-
##
|
344
|
+
## Database Connection Examples
|
282
345
|
|
283
346
|
### PostgreSQL
|
347
|
+
|
348
|
+
**Installation:**
|
349
|
+
|
350
|
+
```bash
|
351
|
+
uv add thoth-dbmanager[postgresql]
|
352
|
+
```
|
353
|
+
|
354
|
+
**Usage:**
|
284
355
|
```python
|
285
356
|
manager = ThothDbManager.get_instance(
|
286
357
|
db_type="postgresql",
|
@@ -294,7 +365,63 @@ manager = ThothDbManager.get_instance(
|
|
294
365
|
)
|
295
366
|
```
|
296
367
|
|
368
|
+
### MySQL
|
369
|
+
|
370
|
+
**Installation:**
|
371
|
+
|
372
|
+
```bash
|
373
|
+
uv add thoth-dbmanager[mysql]
|
374
|
+
```
|
375
|
+
|
376
|
+
**Usage:**
|
377
|
+
|
378
|
+
```python
|
379
|
+
manager = ThothDbManager.get_instance(
|
380
|
+
db_type="mysql",
|
381
|
+
db_root_path="./data",
|
382
|
+
db_mode="production",
|
383
|
+
host="localhost",
|
384
|
+
port=3306,
|
385
|
+
database="myapp",
|
386
|
+
user="dbuser",
|
387
|
+
password="dbpass"
|
388
|
+
)
|
389
|
+
```
|
390
|
+
|
391
|
+
### MariaDB
|
392
|
+
|
393
|
+
**Installation:**
|
394
|
+
|
395
|
+
```bash
|
396
|
+
uv add thoth-dbmanager[mariadb]
|
397
|
+
```
|
398
|
+
|
399
|
+
**Usage:**
|
400
|
+
|
401
|
+
```python
|
402
|
+
manager = ThothDbManager.get_instance(
|
403
|
+
db_type="mariadb",
|
404
|
+
db_root_path="./data",
|
405
|
+
db_mode="production",
|
406
|
+
host="localhost",
|
407
|
+
port=3306,
|
408
|
+
database="myapp",
|
409
|
+
user="dbuser",
|
410
|
+
password="dbpass"
|
411
|
+
)
|
412
|
+
```
|
413
|
+
|
297
414
|
### SQLite
|
415
|
+
|
416
|
+
**Installation:**
|
417
|
+
|
418
|
+
```bash
|
419
|
+
# No additional drivers needed - SQLite is included with Python
|
420
|
+
uv add thoth-dbmanager
|
421
|
+
```
|
422
|
+
|
423
|
+
**Usage:**
|
424
|
+
|
298
425
|
```python
|
299
426
|
manager = ThothDbManager.get_instance(
|
300
427
|
db_type="sqlite",
|
@@ -304,20 +431,99 @@ manager = ThothDbManager.get_instance(
|
|
304
431
|
)
|
305
432
|
```
|
306
433
|
|
307
|
-
###
|
434
|
+
### SQL Server
|
435
|
+
|
436
|
+
**Installation:**
|
437
|
+
|
438
|
+
```bash
|
439
|
+
uv add thoth-dbmanager[sqlserver]
|
440
|
+
```
|
441
|
+
|
442
|
+
**Usage:**
|
443
|
+
|
444
|
+
```python
|
445
|
+
manager = ThothDbManager.get_instance(
|
446
|
+
db_type="sqlserver",
|
447
|
+
db_root_path="./data",
|
448
|
+
db_mode="production",
|
449
|
+
server="localhost",
|
450
|
+
database="myapp",
|
451
|
+
user="dbuser",
|
452
|
+
password="dbpass"
|
453
|
+
)
|
454
|
+
```
|
455
|
+
|
456
|
+
### Oracle
|
457
|
+
|
458
|
+
**Installation:**
|
459
|
+
|
460
|
+
```bash
|
461
|
+
uv add thoth-dbmanager[oracle]
|
462
|
+
```
|
463
|
+
|
464
|
+
**Usage:**
|
465
|
+
|
308
466
|
```python
|
309
467
|
manager = ThothDbManager.get_instance(
|
310
|
-
db_type="
|
468
|
+
db_type="oracle",
|
311
469
|
db_root_path="./data",
|
312
470
|
db_mode="production",
|
313
471
|
host="localhost",
|
314
|
-
port=
|
472
|
+
port=1521,
|
473
|
+
service_name="ORCL",
|
474
|
+
user="dbuser",
|
475
|
+
password="dbpass"
|
476
|
+
)
|
477
|
+
```
|
478
|
+
|
479
|
+
### Informix
|
480
|
+
|
481
|
+
**Installation:**
|
482
|
+
|
483
|
+
```bash
|
484
|
+
uv add thoth-dbmanager[informix]
|
485
|
+
```
|
486
|
+
|
487
|
+
**Usage:**
|
488
|
+
|
489
|
+
```python
|
490
|
+
manager = ThothDbManager.get_instance(
|
491
|
+
db_type="informix",
|
492
|
+
db_root_path="./data",
|
493
|
+
db_mode="production",
|
494
|
+
server="informix_server",
|
315
495
|
database="myapp",
|
496
|
+
host="localhost",
|
316
497
|
user="dbuser",
|
317
498
|
password="dbpass"
|
318
499
|
)
|
319
500
|
```
|
320
501
|
|
502
|
+
### Supabase
|
503
|
+
|
504
|
+
**Installation:**
|
505
|
+
|
506
|
+
```bash
|
507
|
+
uv add thoth-dbmanager[supabase]
|
508
|
+
```
|
509
|
+
|
510
|
+
**Usage:**
|
511
|
+
|
512
|
+
```python
|
513
|
+
manager = ThothDbManager.get_instance(
|
514
|
+
db_type="supabase",
|
515
|
+
db_root_path="./data",
|
516
|
+
db_mode="production",
|
517
|
+
host="db.example.supabase.co",
|
518
|
+
port=5432,
|
519
|
+
database="postgres",
|
520
|
+
user="postgres",
|
521
|
+
password="your_password",
|
522
|
+
project_url="https://your-project.supabase.co",
|
523
|
+
api_key="your_supabase_api_key"
|
524
|
+
)
|
525
|
+
```
|
526
|
+
|
321
527
|
## Error Handling
|
322
528
|
|
323
529
|
The library provides clear error messages for common issues:
|
@@ -1,18 +1,15 @@
|
|
1
1
|
thoth_dbmanager/ThothDbManager.py,sha256=q-jctgt3MJCDFzq6icQdP1oLeVy1ypg402F4ybxhG8c,8943
|
2
2
|
thoth_dbmanager/__init__.py,sha256=Qrd9n7YYMkNKCFiIkzWbjKf5LNOkfp4TkebEpsKqt7E,1655
|
3
3
|
thoth_dbmanager/documents.py,sha256=z-f7zo_CZHqoGM0qHT8-lSUx4NhnMNZTSajpoFtRxn4,5051
|
4
|
-
thoth_dbmanager/dynamic_imports.py,sha256=
|
5
|
-
thoth_dbmanager/adapters/__init__.py,sha256=
|
4
|
+
thoth_dbmanager/dynamic_imports.py,sha256=xDahgiqKvwSYqjPgHiQqD1XPhAbM_JqnU3OhBp2N-fc,7013
|
5
|
+
thoth_dbmanager/adapters/__init__.py,sha256=Ua3ZjSOFlP9kVMFTiC6fyrpcv327b_mBimQ_4fnUsGY,318
|
6
6
|
thoth_dbmanager/adapters/mariadb.py,sha256=LTsf0gORiwqZkd6WtKcOsYLHyDgysxdqNesBscbJwNs,5709
|
7
|
-
thoth_dbmanager/adapters/mysql.py,sha256=TrFbxoMMNWbmUcgkKQYOIfsstmMUmuLlGB7R4ZFEIYI,5698
|
8
|
-
thoth_dbmanager/adapters/oracle.py,sha256=JSrsgohjz5PbVc8nI188MZ4QGBQls4ieNmwWfAKA7II,21468
|
9
7
|
thoth_dbmanager/adapters/postgresql.py,sha256=qxdlxOV7Nvn8U4Lhat50w87Z2S8AzBfmLfEwKfz7dis,17299
|
10
8
|
thoth_dbmanager/adapters/sqlite.py,sha256=RTDszgnAtkE14LKFeoe9lBHgsqXqkmDk6jDCTmVpnoM,14659
|
11
9
|
thoth_dbmanager/adapters/sqlserver.py,sha256=V555kUH54Fb1Atow0BfvbSHmoSwGnrB_RJGn718VQSI,23880
|
12
|
-
thoth_dbmanager/adapters/supabase.py,sha256=bl2C6LpOpykPF3vIbdNRDk43aXLADzSk0wQuwTcEHZA,10348
|
13
10
|
thoth_dbmanager/core/__init__.py,sha256=FlqNW0GZNv1rnwNgyXGzveLqaw0Z90y5AKhR_1DvHBE,269
|
14
|
-
thoth_dbmanager/core/factory.py,sha256=
|
15
|
-
thoth_dbmanager/core/interfaces.py,sha256=
|
11
|
+
thoth_dbmanager/core/factory.py,sha256=84EeZYRoH7y7b19EFHqN4X0CSA6dv-0yxUmlX2zHETk,8840
|
12
|
+
thoth_dbmanager/core/interfaces.py,sha256=MRtNWvsXgtvK7_vdngSe8mNCM0hmRRHyTKnI78uxZ6o,13725
|
16
13
|
thoth_dbmanager/core/registry.py,sha256=url4qpQMoMw4rDrdAAvV6L7-NdO4z86xSJPSwTH_l5g,8624
|
17
14
|
thoth_dbmanager/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
15
|
thoth_dbmanager/helpers/multi_db_generator.py,sha256=frN0SZtWAfeojoJFLs4XLR3ri6h9pHYc-2O4aLAOlbo,23238
|
@@ -24,16 +21,13 @@ thoth_dbmanager/lsh/core.py,sha256=171FqHW7ItAqAPk6g_AoayKTE3Bs1rRZxnt55MJVzjY,6
|
|
24
21
|
thoth_dbmanager/lsh/factory.py,sha256=2Bpkk-OygjaptZAw1yysxO1cxG3QTxmJ1yFGcXHqX3w,2411
|
25
22
|
thoth_dbmanager/lsh/manager.py,sha256=LGrKbGKiBuISlNXaU4Yxfc_BqJfN27MaXapJbzEAjJQ,6513
|
26
23
|
thoth_dbmanager/lsh/storage.py,sha256=qei6fwpmRCBSS8CRtDlnZCuWEmyuOK9gVSTkEJdX0eI,4543
|
27
|
-
thoth_dbmanager/plugins/__init__.py,sha256=
|
24
|
+
thoth_dbmanager/plugins/__init__.py,sha256=KiamB8UgZujwLUE8Q5suYgqC2i5VEAdmC1m0KF9GgvM,430
|
28
25
|
thoth_dbmanager/plugins/mariadb.py,sha256=ElYa4Rexwrofcjcs0UQKan8fZpbU6-n9zghYR9SgRb4,17975
|
29
|
-
thoth_dbmanager/plugins/mysql.py,sha256=mbDsIDV2H_BWYANU4JHMsUkxLQICuGtjKTTPbig2Ngs,16546
|
30
|
-
thoth_dbmanager/plugins/oracle.py,sha256=k4Yxvz5MdsH3Sfty9lxbhr8igSnHvGbGujz3bLpNcHo,5230
|
31
26
|
thoth_dbmanager/plugins/postgresql.py,sha256=pI1W9oHpQty8tHMoEDcsOT-Msv6S4aoFcArOGFxLR7Q,5518
|
32
|
-
thoth_dbmanager/plugins/sqlite.py,sha256=
|
27
|
+
thoth_dbmanager/plugins/sqlite.py,sha256=gkgZ6-Vjkab0IP3ffHOg4bbpDHsjO_N4DesUnSDNAmQ,8857
|
33
28
|
thoth_dbmanager/plugins/sqlserver.py,sha256=mMb3F5FmSWV02FZwj-Ult-2TjuyeVA4Fl1iME1dbgLU,5289
|
34
|
-
thoth_dbmanager/
|
35
|
-
thoth_dbmanager-0.5.
|
36
|
-
thoth_dbmanager-0.5.
|
37
|
-
thoth_dbmanager-0.5.
|
38
|
-
thoth_dbmanager-0.5.
|
39
|
-
thoth_dbmanager-0.5.0.dist-info/RECORD,,
|
29
|
+
thoth_dbmanager-0.5.2.dist-info/licenses/LICENSE,sha256=81-BOzGgwtY1XdYfkwMQB87AkOGXI9OMq0kjNcZA4UE,1071
|
30
|
+
thoth_dbmanager-0.5.2.dist-info/METADATA,sha256=kjNeZj0QtbNG4zG1cynSzBGf9NYjSfPU3Bh6rNL99go,15032
|
31
|
+
thoth_dbmanager-0.5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
32
|
+
thoth_dbmanager-0.5.2.dist-info/top_level.txt,sha256=b9ttxm9RUc0KUCASEKRx6FqoREYJ1-KZWSpNuaM0uQ4,16
|
33
|
+
thoth_dbmanager-0.5.2.dist-info/RECORD,,
|