zaturn 0.2.0__py3-none-any.whl → 0.2.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.
- zaturn/mcp/__init__.py +4 -0
- zaturn/tools/query_utils.py +13 -1
- {zaturn-0.2.0.dist-info → zaturn-0.2.1.dist-info}/METADATA +3 -2
- {zaturn-0.2.0.dist-info → zaturn-0.2.1.dist-info}/RECORD +8 -8
- {zaturn-0.2.0.dist-info → zaturn-0.2.1.dist-info}/WHEEL +0 -0
- {zaturn-0.2.0.dist-info → zaturn-0.2.1.dist-info}/entry_points.txt +0 -0
- {zaturn-0.2.0.dist-info → zaturn-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {zaturn-0.2.0.dist-info → zaturn-0.2.1.dist-info}/top_level.txt +0 -0
zaturn/mcp/__init__.py
CHANGED
@@ -56,6 +56,10 @@ for s in source_list:
|
|
56
56
|
source_type = 'mysql'
|
57
57
|
s = s.replace('mysql://', 'mysql+pymysql://')
|
58
58
|
source_name = source.split('/')[-1].split('?')[0]
|
59
|
+
elif source.startswith("mssql://"):
|
60
|
+
source_type = 'mssql'
|
61
|
+
s = s.replace('mssql://', 'mssql+pymssql://')
|
62
|
+
source_name = source.split('/')[-1].split('?')[0]
|
59
63
|
elif source.startswith('clickhouse://'):
|
60
64
|
source_type = 'clickhouse'
|
61
65
|
source_name = source.split('/')[-1].split('?')[0]
|
zaturn/tools/query_utils.py
CHANGED
@@ -30,6 +30,10 @@ def list_tables(source):
|
|
30
30
|
for col in list(result):
|
31
31
|
if col.startswith("Tables_in_"):
|
32
32
|
return result[col].to_list()
|
33
|
+
|
34
|
+
case "mssql":
|
35
|
+
result = execute_query(source, "SELECT name FROM sys.tables")
|
36
|
+
return result['name'].to_list()
|
33
37
|
|
34
38
|
case "duckdb" | "csv" | "parquet" | "clickhouse":
|
35
39
|
result = execute_query(source, "SHOW TABLES")
|
@@ -46,7 +50,7 @@ def describe_table(source, table_name):
|
|
46
50
|
f'PRAGMA table_info("{table_name}");'
|
47
51
|
)
|
48
52
|
|
49
|
-
case 'postgresql':
|
53
|
+
case 'postgresql' | 'mssql':
|
50
54
|
return execute_query(source,
|
51
55
|
f"SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = '{table_name}';"
|
52
56
|
)
|
@@ -81,6 +85,14 @@ def execute_query(source: dict, query: str):
|
|
81
85
|
result = session.execute(sqlalchemy.text(query))
|
82
86
|
return pd.DataFrame(result)
|
83
87
|
|
88
|
+
case "mssql":
|
89
|
+
engine = sqlalchemy.create_engine(url)
|
90
|
+
with Session(engine) as session:
|
91
|
+
# no known way to ensure read-only here
|
92
|
+
# please use read-only credentials
|
93
|
+
result = session.execute(sqlalchemy.text(query))
|
94
|
+
return pd.DataFrame(result)
|
95
|
+
|
84
96
|
case "postgresql":
|
85
97
|
engine = sqlalchemy.create_engine(url)
|
86
98
|
with engine.connect() as conn:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: zaturn
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.1
|
4
4
|
Summary: AI Data Analysis MCP & Studio
|
5
5
|
Author-email: Karthik Devan <krtdvn@gmail.com>
|
6
6
|
Maintainer-email: Karthik Devan <krtdvn@gmail.com>
|
@@ -25,6 +25,7 @@ Requires-Dist: platformdirs>=4.3.7
|
|
25
25
|
Requires-Dist: plotly[express]>=6.0.1
|
26
26
|
Requires-Dist: psycopg2-binary>=2.9.10
|
27
27
|
Requires-Dist: pyarrow>=19.0.1
|
28
|
+
Requires-Dist: pymssql>=2.3.7
|
28
29
|
Requires-Dist: pymysql>=1.1.1
|
29
30
|
Requires-Dist: python-lsp-server>=1.12.2
|
30
31
|
Requires-Dist: python-slugify>=8.0.4
|
@@ -58,7 +59,7 @@ https://github.com/user-attachments/assets/d42dc433-e5ec-4b3e-bef0-5cfc097396ab
|
|
58
59
|
### Multiple Data Sources
|
59
60
|
|
60
61
|
Zaturn can currently connect to the following data sources:
|
61
|
-
- SQL Databases: PostgreSQL, SQLite, DuckDB, MySQL, ClickHouse
|
62
|
+
- SQL Databases: PostgreSQL, SQLite, DuckDB, MySQL, ClickHouse, SQL Server
|
62
63
|
- Files: CSV, Parquet
|
63
64
|
|
64
65
|
Connectors for more data sources are being added.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
zaturn/mcp/__init__.py,sha256
|
1
|
+
zaturn/mcp/__init__.py,sha256=lBfs5Ztpih-Dn5vuTxJUTzjD2SM2icAZZM9GgRVozYU,3399
|
2
2
|
zaturn/studio/__init__.py,sha256=A1QxWydtsE0VmsJlvF7O9Fx1-WKjV3MBPje7knFSDzw,83
|
3
3
|
zaturn/studio/agent_wrapper.py,sha256=4mEMRfE1Tfv63D7OIabqUbEJdIgO2yo8UXO6PKvNrmI,4603
|
4
4
|
zaturn/studio/app.py,sha256=LEoSjs5wpZGX1B7pcJ2e_6CaxOFjbO6JitxlkJv__30,9208
|
@@ -28,12 +28,12 @@ zaturn/studio/templates/css/style.css,sha256=cKImLAjLp6XjHdT16v9yJS0DHG2wWx8djR1
|
|
28
28
|
zaturn/tools/__init__.py,sha256=vOcHneRuZll9k-2e3sra7m8qfdc4IoAFYc2g_xK79HE,262
|
29
29
|
zaturn/tools/config.py,sha256=8YCwFp1emhEfbbJd_KTQ_Nrl4yt9tJoDZHgMXatJGjk,3382
|
30
30
|
zaturn/tools/core.py,sha256=4fHxSIbO22cTIejJk02GzUBfWimh1Ql9mZ3JgI1qLBY,2893
|
31
|
-
zaturn/tools/query_utils.py,sha256=
|
31
|
+
zaturn/tools/query_utils.py,sha256=OnXbONmEgsHcScrJ76b7P3BRLOKgi8TMkhxBcLQK9cY,5306
|
32
32
|
zaturn/tools/visualizations.py,sha256=aPXCN1YIjCz6uiwJjduKCiLLtnBFX92hTvjy5EqQYk8,9509
|
33
33
|
zaturn/tools/example_data/all_pokemon_data.csv,sha256=SUlGHHWbehuLg-ch1YUrQ6-xBtqHGw6rIkyn70fAgCk,130893
|
34
|
-
zaturn-0.2.
|
35
|
-
zaturn-0.2.
|
36
|
-
zaturn-0.2.
|
37
|
-
zaturn-0.2.
|
38
|
-
zaturn-0.2.
|
39
|
-
zaturn-0.2.
|
34
|
+
zaturn-0.2.1.dist-info/licenses/LICENSE,sha256=mZSuFlbEBZGl0-8ULRMLdRDbhau5hrWRNQOjytYeaug,1070
|
35
|
+
zaturn-0.2.1.dist-info/METADATA,sha256=NsCeZRR_EKj5TekqsM4R4fgicuUbwWf29PxHm5PQ_7k,3999
|
36
|
+
zaturn-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
37
|
+
zaturn-0.2.1.dist-info/entry_points.txt,sha256=MWMWX0dE_ZQM4StGKCLxJym_D91F82RcBi2LBj0hEho,82
|
38
|
+
zaturn-0.2.1.dist-info/top_level.txt,sha256=KLUnwQwVZkfd5YCnnqR35MOOs8KLhanPGelvmRo2MVA,7
|
39
|
+
zaturn-0.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|