sqlshell 0.1.8__py3-none-any.whl → 0.2.0__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 sqlshell might be problematic. Click here for more details.
- sqlshell/LICENSE +21 -0
- sqlshell/MANIFEST.in +6 -0
- sqlshell/README.md +59 -0
- sqlshell/__init__.py +1 -1
- sqlshell/context_suggester.py +765 -0
- sqlshell/create_test_data.py +106 -30
- sqlshell/db/__init__.py +5 -0
- sqlshell/db/database_manager.py +837 -0
- sqlshell/editor.py +610 -52
- sqlshell/main.py +2657 -1164
- sqlshell/menus.py +171 -0
- sqlshell/query_tab.py +201 -0
- sqlshell/resources/create_icon.py +106 -28
- sqlshell/resources/create_splash.py +41 -11
- sqlshell/resources/icon.png +0 -0
- sqlshell/resources/logo_large.png +0 -0
- sqlshell/resources/logo_medium.png +0 -0
- sqlshell/resources/logo_small.png +0 -0
- sqlshell/splash_screen.py +276 -48
- sqlshell/styles.py +257 -0
- sqlshell/suggester_integration.py +275 -0
- sqlshell/table_list.py +907 -0
- sqlshell/ui/__init__.py +6 -0
- sqlshell/ui/bar_chart_delegate.py +49 -0
- sqlshell/ui/filter_header.py +403 -0
- sqlshell/utils/__init__.py +8 -0
- sqlshell/utils/profile_entropy.py +347 -0
- sqlshell/utils/profile_keys.py +356 -0
- sqlshell-0.2.0.dist-info/METADATA +198 -0
- sqlshell-0.2.0.dist-info/RECORD +41 -0
- {sqlshell-0.1.8.dist-info → sqlshell-0.2.0.dist-info}/WHEEL +1 -1
- sqlshell/setup.py +0 -42
- sqlshell-0.1.8.dist-info/METADATA +0 -120
- sqlshell-0.1.8.dist-info/RECORD +0 -21
- {sqlshell-0.1.8.dist-info → sqlshell-0.2.0.dist-info}/entry_points.txt +0 -0
- {sqlshell-0.1.8.dist-info → sqlshell-0.2.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sqlshell
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A powerful SQL shell with GUI interface for data analysis
|
|
5
|
+
Author: SQLShell Team
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/oyvinrog/SQLShell
|
|
8
|
+
Keywords: sql,data analysis,gui,duckdb
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Requires-Dist: pandas>=2.0.0
|
|
19
|
+
Requires-Dist: numpy>=1.24.0
|
|
20
|
+
Requires-Dist: PyQt6>=6.4.0
|
|
21
|
+
Requires-Dist: duckdb>=0.9.0
|
|
22
|
+
Requires-Dist: openpyxl>=3.1.0
|
|
23
|
+
Requires-Dist: pyarrow>=14.0.1
|
|
24
|
+
Requires-Dist: fastparquet>=2023.10.1
|
|
25
|
+
Requires-Dist: xlrd>=2.0.1
|
|
26
|
+
Requires-Dist: deltalake
|
|
27
|
+
Requires-Dist: Pillow>=10.0.0
|
|
28
|
+
|
|
29
|
+
# SQLShell
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
|
|
33
|
+
<img src="sqlshell_logo.png" alt="SQLShell Logo" width="180" height="auto">
|
|
34
|
+
|
|
35
|
+
**A powerful SQL shell with GUI interface for data analysis**
|
|
36
|
+
|
|
37
|
+
<img src="sqlshell_demo.png" alt="SQLShell Interface" width="80%" height="auto">
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
## 🚀 Key Features
|
|
42
|
+
|
|
43
|
+
- **Interactive SQL Interface** - Rich syntax highlighting for enhanced query writing
|
|
44
|
+
- **Context-Aware Suggestions** - Intelligent SQL autocompletion based on query context and schema
|
|
45
|
+
- **DuckDB Integration** - Powerful analytical queries powered by DuckDB
|
|
46
|
+
- **Multi-Format Support** - Import and query Excel (.xlsx, .xls), CSV, and Parquet files effortlessly
|
|
47
|
+
- **Modern UI** - Clean, tabular results display with intuitive controls
|
|
48
|
+
- **Table Preview** - Quick view of imported data tables
|
|
49
|
+
- **Test Data Generation** - Built-in sample data for testing and learning
|
|
50
|
+
- **Multiple Views** - Support for multiple concurrent table views
|
|
51
|
+
- **Productivity Tools** - Streamlined workflow with keyboard shortcuts (e.g., Ctrl+Enter for query execution)
|
|
52
|
+
|
|
53
|
+
## 📦 Installation
|
|
54
|
+
|
|
55
|
+
### Using pip (Recommended)
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install sqlshell
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Linux Setup with Virtual Environment
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Create and activate virtual environment
|
|
65
|
+
python3 -m venv ~/.venv/sqlshell
|
|
66
|
+
source ~/.venv/sqlshell/bin/activate
|
|
67
|
+
|
|
68
|
+
# Install SQLShell
|
|
69
|
+
pip install sqlshell
|
|
70
|
+
|
|
71
|
+
# Configure shell alias
|
|
72
|
+
echo 'alias sqls="~/.venv/sqlshell/bin/sqls"' >> ~/.bashrc # or ~/.zshrc for Zsh
|
|
73
|
+
source ~/.bashrc # or source ~/.zshrc
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Development Installation
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
git clone https://github.com/oyvinrog/SQLShell.git
|
|
80
|
+
cd SQLShell
|
|
81
|
+
pip install -e .
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 🎯 Getting Started
|
|
85
|
+
|
|
86
|
+
1. **Launch the Application**
|
|
87
|
+
```bash
|
|
88
|
+
sqls
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If the `sqls` command doesn't work (e.g., "access denied" on Windows), you can use this alternative:
|
|
92
|
+
```bash
|
|
93
|
+
python -c "import sqlshell; sqlshell.start()"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
2. **Database Connection**
|
|
97
|
+
- SQLShell automatically connects to a local DuckDB database named 'pool.db'
|
|
98
|
+
|
|
99
|
+
3. **Working with Data Files**
|
|
100
|
+
- Click "Load Files" to select your Excel, CSV, or Parquet files
|
|
101
|
+
- File contents are loaded as queryable SQL tables
|
|
102
|
+
- Query using standard SQL syntax
|
|
103
|
+
|
|
104
|
+
4. **Query Execution**
|
|
105
|
+
- Enter SQL in the editor
|
|
106
|
+
- Execute using Ctrl+Enter or the "Execute" button
|
|
107
|
+
- View results in the structured output panel
|
|
108
|
+
|
|
109
|
+
5. **Test Data**
|
|
110
|
+
- Load sample test data using the "Test" button for quick experimentation
|
|
111
|
+
|
|
112
|
+
6. **Using Context-Aware Suggestions**
|
|
113
|
+
- Press Ctrl+Space to manually trigger suggestions
|
|
114
|
+
- Suggestions appear automatically as you type
|
|
115
|
+
- Context-specific suggestions based on your query position:
|
|
116
|
+
- After SELECT: columns and functions
|
|
117
|
+
- After FROM/JOIN: tables with join conditions
|
|
118
|
+
- After WHERE: columns with appropriate operators
|
|
119
|
+
- Inside functions: relevant column suggestions
|
|
120
|
+
|
|
121
|
+
## 📝 Query Examples
|
|
122
|
+
|
|
123
|
+
### Basic Join Operation
|
|
124
|
+
```sql
|
|
125
|
+
SELECT *
|
|
126
|
+
FROM sample_sales_data cd
|
|
127
|
+
INNER JOIN product_catalog pc ON pc.productid = cd.productid
|
|
128
|
+
LIMIT 3;
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Multi-Statement Queries
|
|
132
|
+
```sql
|
|
133
|
+
-- Create a temporary view
|
|
134
|
+
CREATE OR REPLACE TEMPORARY VIEW test_v AS
|
|
135
|
+
SELECT *
|
|
136
|
+
FROM sample_sales_data cd
|
|
137
|
+
INNER JOIN product_catalog pc ON pc.productid = cd.productid;
|
|
138
|
+
|
|
139
|
+
-- Query the view
|
|
140
|
+
SELECT DISTINCT productid
|
|
141
|
+
FROM test_v;
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## 💡 Pro Tips
|
|
145
|
+
|
|
146
|
+
- Use temporary views for complex query organization
|
|
147
|
+
- Leverage keyboard shortcuts for efficient workflow
|
|
148
|
+
- Explore the multi-format support for various data sources
|
|
149
|
+
- Create multiple tabs for parallel query development
|
|
150
|
+
- The context-aware suggestions learn from your query patterns
|
|
151
|
+
- Type `table_name.` to see all columns for a specific table
|
|
152
|
+
- After JOIN keyword, the system suggests relevant tables and join conditions
|
|
153
|
+
|
|
154
|
+
## 📊 Column Profiler
|
|
155
|
+
|
|
156
|
+
The Column Profiler provides quick statistical insights into your table columns:
|
|
157
|
+
|
|
158
|
+
<img src="column_profiler.png" alt="Column Profiler" width="80%" height="auto">
|
|
159
|
+
|
|
160
|
+
### Using the Column Profiler
|
|
161
|
+
|
|
162
|
+
1. **Access the Profiler**
|
|
163
|
+
- Right-click on any table in the schema browser
|
|
164
|
+
- Select "Profile Table" from the context menu
|
|
165
|
+
|
|
166
|
+
2. **View Column Statistics**
|
|
167
|
+
- Instantly see key metrics for each column:
|
|
168
|
+
- Data type
|
|
169
|
+
- Non-null count and percentage
|
|
170
|
+
- Unique values count
|
|
171
|
+
- Mean, median, min, and max values (for numeric columns)
|
|
172
|
+
- Most frequent values and their counts
|
|
173
|
+
- Distribution visualization
|
|
174
|
+
|
|
175
|
+
3. **Benefits**
|
|
176
|
+
- Quickly understand data distribution
|
|
177
|
+
- Identify outliers and data quality issues
|
|
178
|
+
- Make informed decisions about query conditions
|
|
179
|
+
- Assess column cardinality for join operations
|
|
180
|
+
|
|
181
|
+
The Column Profiler is an invaluable tool for exploratory data analysis, helping you gain insights before writing complex queries.
|
|
182
|
+
|
|
183
|
+
## 📋 Requirements
|
|
184
|
+
|
|
185
|
+
- Python 3.8 or higher
|
|
186
|
+
- Dependencies (automatically installed):
|
|
187
|
+
- PyQt6 ≥ 6.4.0
|
|
188
|
+
- DuckDB ≥ 0.9.0
|
|
189
|
+
- Pandas ≥ 2.0.0
|
|
190
|
+
- NumPy ≥ 1.24.0
|
|
191
|
+
- openpyxl ≥ 3.1.0 (Excel support)
|
|
192
|
+
- pyarrow ≥ 14.0.1 (Parquet support)
|
|
193
|
+
- fastparquet ≥ 2023.10.1 (Alternative parquet engine)
|
|
194
|
+
- xlrd ≥ 2.0.1 (Support for older .xls files)
|
|
195
|
+
|
|
196
|
+
## 📄 License
|
|
197
|
+
|
|
198
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
sqlshell/LICENSE,sha256=YFVzvqHDVzBVtEZoKwcHhashVdNy4P7tDEQ561jAdyo,1070
|
|
2
|
+
sqlshell/MANIFEST.in,sha256=UautKSW4Kzjsy1Ti05-P58qRgM4ct4mmG3aserBGaX0,144
|
|
3
|
+
sqlshell/README.md,sha256=UoWQzdsYThrOoajT40iOtpI73g5ANB7w12vll0eH0Ck,1357
|
|
4
|
+
sqlshell/__init__.py,sha256=GAZ3g4YsExb-aFyN0a77whBxRRk4XMGJYakvpeKbxdg,164
|
|
5
|
+
sqlshell/context_suggester.py,sha256=OdfSBqwKWtf6yGj-_cNjf9RZG9cc70TWZ_7ieAVKJqk,33970
|
|
6
|
+
sqlshell/create_test_data.py,sha256=uJSFyqm8zYWpyERPd29iMu-EbtvKiwK5WV0N-LibNOc,5385
|
|
7
|
+
sqlshell/editor.py,sha256=iWSYUtsNCud7HWZrcqD9Ef7FEa0nt7ekeUHV6CmCgao,39635
|
|
8
|
+
sqlshell/main.py,sha256=vt7s6dXmY6iw-Y3jr2YtPNMwwvdqPu1zqNRNidtIRN0,150575
|
|
9
|
+
sqlshell/menus.py,sha256=hiT1CXXnsRKkai7oJlPi94du_GKtIhl5X5LOGvqcOqs,5684
|
|
10
|
+
sqlshell/query_tab.py,sha256=9Yu_7MRikZXrQ003N2HOvjFEBdiz_J9ZLWgTzXPiumc,8404
|
|
11
|
+
sqlshell/splash_screen.py,sha256=K0Ku_nXJWmWSnVEh2OttIthRZcnUoY_tmjIAWIWLm7Y,17604
|
|
12
|
+
sqlshell/sqlshell_demo.png,sha256=dPp9J1FVqQVfrh-gekosuha2Jw2p2--wxbOmt2kr7fg,133550
|
|
13
|
+
sqlshell/styles.py,sha256=EGA_Ow-XerPEQgj82ts3fnqkEPMcjSlJPblbPu9L__s,7135
|
|
14
|
+
sqlshell/suggester_integration.py,sha256=w3fKuSq5ex5OHxSBzZunyq3mbGvX06-7nxgLClnK5Kw,13232
|
|
15
|
+
sqlshell/syntax_highlighter.py,sha256=mPwsD8N4XzAUx0IgwlelyfjUhe0xmH0Ug3UI9hTcHz0,5861
|
|
16
|
+
sqlshell/table_list.py,sha256=ET9UGxhRL2j42GC6WqocotvQIOUzRskH9BnmciVX_As,37670
|
|
17
|
+
sqlshell/data/create_test_data.py,sha256=sUTcf50V8-bVwYV2VNTLK65c-iHiU4wb99By67I10zM,5404
|
|
18
|
+
sqlshell/db/__init__.py,sha256=AJGRkywFCnJliwfOBvtE_ISXjdESkRea7lBFM5KjuTU,152
|
|
19
|
+
sqlshell/db/database_manager.py,sha256=DRPoRYgY9DthD1YvLuMeo-aRfaAAcdAKZKXMPDmAcsg,35722
|
|
20
|
+
sqlshell/resources/__init__.py,sha256=VLTJ_5pUHhctRiV8UZDvG-jnsjgT6JQvW-ZPzIJqBIY,44
|
|
21
|
+
sqlshell/resources/create_icon.py,sha256=O7idVEKwmSXxLUsbeRn6zcYVQLPSdJi98nGamTgXiM4,4905
|
|
22
|
+
sqlshell/resources/create_splash.py,sha256=t1KK43Y0pHKGcdRkbnZgV6_y1c1C0THHQl5_fmpC2gQ,3347
|
|
23
|
+
sqlshell/resources/icon.png,sha256=l7MI1PWCED1XzsRgUjPR3A9pmbZ253tghd5s_0lJBMs,3173
|
|
24
|
+
sqlshell/resources/logo_large.png,sha256=pjLs6kXCy8gW8Iiq1gb6ZLnJEQ7_2GxtoJ_HDZ0_ERQ,31080
|
|
25
|
+
sqlshell/resources/logo_medium.png,sha256=brEV-YLgKS4RSxdZBgrwq_MvMA9zpsYvvvWgchUdjK4,14087
|
|
26
|
+
sqlshell/resources/logo_small.png,sha256=X4oQwj1k4OTbY785hWUIR12f1yAduV-USNzEu7aqkHs,6677
|
|
27
|
+
sqlshell/resources/splash_screen.gif,sha256=H24DQBdK1EsqQTWZkgInjM5ouOzY4cMesUoza10auNg,3070484
|
|
28
|
+
sqlshell/sqlshell/__init__.py,sha256=6Wp5nabfTzH5rkC-2jYo_ZjCuw8utmj21Jpy8vBuliI,100
|
|
29
|
+
sqlshell/sqlshell/create_test_data.py,sha256=TFXgWeK1l3l_c4Dg38yS8Df4sBUfOZcBucXngtpThvk,4624
|
|
30
|
+
sqlshell/sqlshell/create_test_databases.py,sha256=oqryFJJahqLFsAjBFM4r9Fe1ea7djDcRpT9U_aBf7PU,3573
|
|
31
|
+
sqlshell/ui/__init__.py,sha256=2CsTDAvRZJ99gkjs3-rdwkxyGVAKXX6ueOhPdP1VXQc,206
|
|
32
|
+
sqlshell/ui/bar_chart_delegate.py,sha256=tbtIt2ZqPIcYWNJzpONpYa0CYURkLdjkg23TI7TmOKY,1881
|
|
33
|
+
sqlshell/ui/filter_header.py,sha256=c4Mg1J1yTUfrnT9C-xDWHhcauRsgU3WNfvVInv1J814,16074
|
|
34
|
+
sqlshell/utils/__init__.py,sha256=iPKvOsKcfnV7xvhQVOz8BiQ4kbFZ7PGUW8vg0vyMqvk,225
|
|
35
|
+
sqlshell/utils/profile_entropy.py,sha256=pJTcXlBkSEPzL3Fvxizf5gBkw6IsUjfa9Y6MjAqF1do,13238
|
|
36
|
+
sqlshell/utils/profile_keys.py,sha256=ajdBTqvZVmAlVaY-kDmv_D8D3sKASG75PLTzf8Y8nX4,14170
|
|
37
|
+
sqlshell-0.2.0.dist-info/METADATA,sha256=EihrTD_KfJTWcYr24WnHEpMBfbYNK6NRJHVhCeU8vQQ,6101
|
|
38
|
+
sqlshell-0.2.0.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
|
39
|
+
sqlshell-0.2.0.dist-info/entry_points.txt,sha256=Kd0fOvyOW7UiTgTVY7abVOmDIH2Y2nawGTp5kVadac4,44
|
|
40
|
+
sqlshell-0.2.0.dist-info/top_level.txt,sha256=ahwsMFhvAqI97ZkT2xvHL5iZCO1p13mNiUOFkdSFwms,9
|
|
41
|
+
sqlshell-0.2.0.dist-info/RECORD,,
|
sqlshell/setup.py
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
from setuptools import setup, find_packages
|
|
2
|
-
|
|
3
|
-
setup(
|
|
4
|
-
name="sqlshell",
|
|
5
|
-
version="0.1.1",
|
|
6
|
-
packages=find_packages(),
|
|
7
|
-
install_requires=[
|
|
8
|
-
'pandas>=2.0.0',
|
|
9
|
-
'numpy>=1.24.0',
|
|
10
|
-
'PyQt6>=6.4.0',
|
|
11
|
-
'duckdb>=0.9.0',
|
|
12
|
-
'openpyxl>=3.1.0',
|
|
13
|
-
'pyarrow>=14.0.1',
|
|
14
|
-
'fastparquet>=2023.10.1',
|
|
15
|
-
'xlrd>=2.0.1'
|
|
16
|
-
],
|
|
17
|
-
entry_points={
|
|
18
|
-
'console_scripts': [
|
|
19
|
-
'sqls=sqlshell.main:main',
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
author="SQLShell Team",
|
|
23
|
-
description="A powerful SQL shell with GUI interface for data analysis",
|
|
24
|
-
long_description=open('README.md').read(),
|
|
25
|
-
long_description_content_type="text/markdown",
|
|
26
|
-
keywords="sql, data analysis, gui, duckdb",
|
|
27
|
-
url="https://github.com/yourusername/sqlshell",
|
|
28
|
-
classifiers=[
|
|
29
|
-
"Development Status :: 3 - Alpha",
|
|
30
|
-
"Intended Audience :: Developers",
|
|
31
|
-
"Programming Language :: Python :: 3",
|
|
32
|
-
"Programming Language :: Python :: 3.8",
|
|
33
|
-
"Programming Language :: Python :: 3.9",
|
|
34
|
-
"Programming Language :: Python :: 3.10",
|
|
35
|
-
"Programming Language :: Python :: 3.11",
|
|
36
|
-
],
|
|
37
|
-
python_requires=">=3.8",
|
|
38
|
-
include_package_data=True,
|
|
39
|
-
package_data={
|
|
40
|
-
'sqlshell': ['*.db'],
|
|
41
|
-
},
|
|
42
|
-
)
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: sqlshell
|
|
3
|
-
Version: 0.1.8
|
|
4
|
-
Summary: A powerful SQL shell with GUI interface for data analysis
|
|
5
|
-
Home-page: https://github.com/yourusername/sqlshell
|
|
6
|
-
Author: SQLShell Team
|
|
7
|
-
License: MIT
|
|
8
|
-
Project-URL: Homepage, https://github.com/oyvinrog/SQLShell
|
|
9
|
-
Keywords: sql,data analysis,gui,duckdb
|
|
10
|
-
Classifier: Development Status :: 3 - Alpha
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
-
Requires-Python: >=3.8
|
|
18
|
-
Description-Content-Type: text/markdown
|
|
19
|
-
Requires-Dist: pandas>=2.0.0
|
|
20
|
-
Requires-Dist: numpy>=1.24.0
|
|
21
|
-
Requires-Dist: PyQt6>=6.4.0
|
|
22
|
-
Requires-Dist: duckdb>=0.9.0
|
|
23
|
-
Requires-Dist: openpyxl>=3.1.0
|
|
24
|
-
Requires-Dist: pyarrow>=14.0.1
|
|
25
|
-
Requires-Dist: fastparquet>=2023.10.1
|
|
26
|
-
Requires-Dist: xlrd>=2.0.1
|
|
27
|
-
Dynamic: home-page
|
|
28
|
-
Dynamic: requires-python
|
|
29
|
-
|
|
30
|
-
# SQLShell
|
|
31
|
-
|
|
32
|
-
<div align="center">
|
|
33
|
-
|
|
34
|
-

|
|
35
|
-
|
|
36
|
-
**A modern SQL REPL interface for seamless querying of Excel, Parquet, and SQLite databases**
|
|
37
|
-
|
|
38
|
-

|
|
39
|
-
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
## 🚀 Key Features
|
|
43
|
-
|
|
44
|
-
- **Interactive SQL Interface** - Rich syntax highlighting for enhanced query writing
|
|
45
|
-
- **DuckDB Integration** - Built-in support for local DuckDB database (pool.db)
|
|
46
|
-
- **Multi-Format Support** - Import and query Excel (.xlsx, .xls) and CSV files effortlessly
|
|
47
|
-
- **Modern UI** - Clean, tabular results display with intuitive controls
|
|
48
|
-
- **Productivity Tools** - Streamlined workflow with keyboard shortcuts (e.g., Ctrl+Enter for query execution)
|
|
49
|
-
|
|
50
|
-
## 📦 Installation
|
|
51
|
-
|
|
52
|
-
### Linux Setup with Virtual Environment
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
# Create and activate virtual environment
|
|
56
|
-
python3 -m venv ~/.venv/sqlshell
|
|
57
|
-
source ~/.venv/sqlshell/bin/activate
|
|
58
|
-
|
|
59
|
-
# Install SQLShell
|
|
60
|
-
pip install sqlshell
|
|
61
|
-
|
|
62
|
-
# Configure shell alias
|
|
63
|
-
echo 'alias sqls="~/.venv/sqlshell/bin/sqls"' >> ~/.bashrc # or ~/.zshrc for Zsh
|
|
64
|
-
source ~/.bashrc # or source ~/.zshrc
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Windows Quick Start
|
|
68
|
-
SQLShell is immediately available via the `sqls` command after installation:
|
|
69
|
-
```bash
|
|
70
|
-
pip install sqlshell
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## 🎯 Getting Started
|
|
74
|
-
|
|
75
|
-
1. **Launch the Application**
|
|
76
|
-
```bash
|
|
77
|
-
sqls
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
2. **Database Connection**
|
|
81
|
-
- SQLShell automatically connects to a local DuckDB database named 'pool.db'
|
|
82
|
-
|
|
83
|
-
3. **Working with Excel Files**
|
|
84
|
-
- Click "Browse Excel" to select your file
|
|
85
|
-
- File contents are loaded as 'imported_data' table
|
|
86
|
-
- Query using standard SQL syntax
|
|
87
|
-
|
|
88
|
-
4. **Query Execution**
|
|
89
|
-
- Enter SQL in the editor
|
|
90
|
-
- Execute using Ctrl+Enter or the "Execute" button
|
|
91
|
-
- View results in the structured output panel
|
|
92
|
-
|
|
93
|
-
## 📝 Query Examples
|
|
94
|
-
|
|
95
|
-
### Basic Join Operation
|
|
96
|
-
```sql
|
|
97
|
-
SELECT *
|
|
98
|
-
FROM sample_sales_data cd
|
|
99
|
-
INNER JOIN product_catalog pc ON pc.productid = cd.productid
|
|
100
|
-
LIMIT 3;
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Multi-Statement Queries
|
|
104
|
-
```sql
|
|
105
|
-
-- Create a temporary view
|
|
106
|
-
CREATE OR REPLACE TEMPORARY VIEW test_v AS
|
|
107
|
-
SELECT *
|
|
108
|
-
FROM sample_sales_data cd
|
|
109
|
-
INNER JOIN product_catalog pc ON pc.productid = cd.productid;
|
|
110
|
-
|
|
111
|
-
-- Query the view
|
|
112
|
-
SELECT DISTINCT productid
|
|
113
|
-
FROM test_v;
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## 💡 Pro Tips
|
|
117
|
-
|
|
118
|
-
- Use temporary views for complex query organization
|
|
119
|
-
- Leverage keyboard shortcuts for efficient workflow
|
|
120
|
-
- Explore the multi-format support for various data sources
|
sqlshell-0.1.8.dist-info/RECORD
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
sqlshell/__init__.py,sha256=DqhqqdKdvfwO2iUG1Yd7WPmInpG-OcGhqP8LgblopgI,164
|
|
2
|
-
sqlshell/create_test_data.py,sha256=AzrEsKlZsR1H1Xlp7IKOzWQ2N6FsVISJbc6CerI8IJ0,1954
|
|
3
|
-
sqlshell/editor.py,sha256=4252dxINzJd1jr7CqgSI6IxUYHdkZ1OGZ1qBYN5-MKM,14396
|
|
4
|
-
sqlshell/main.py,sha256=0eQlAQnRkFV14Ot8vJikG7Vq_zkSAqqohu50Y8UREyQ,75480
|
|
5
|
-
sqlshell/setup.py,sha256=bAIXTpgAHhBRmPdT13Klzq16cjd4w4NOYSbyV_rxjlQ,1245
|
|
6
|
-
sqlshell/splash_screen.py,sha256=XkXvSURgQzZfxJvP231Ue4J2E49ph21tWbvfGU03Ogk,6914
|
|
7
|
-
sqlshell/sqlshell_demo.png,sha256=dPp9J1FVqQVfrh-gekosuha2Jw2p2--wxbOmt2kr7fg,133550
|
|
8
|
-
sqlshell/syntax_highlighter.py,sha256=mPwsD8N4XzAUx0IgwlelyfjUhe0xmH0Ug3UI9hTcHz0,5861
|
|
9
|
-
sqlshell/data/create_test_data.py,sha256=sUTcf50V8-bVwYV2VNTLK65c-iHiU4wb99By67I10zM,5404
|
|
10
|
-
sqlshell/resources/__init__.py,sha256=VLTJ_5pUHhctRiV8UZDvG-jnsjgT6JQvW-ZPzIJqBIY,44
|
|
11
|
-
sqlshell/resources/create_icon.py,sha256=ubNYyBYx5HtYpV8eiGY8Fb1VWUoQt-npaqUckiCimnQ,2030
|
|
12
|
-
sqlshell/resources/create_splash.py,sha256=cj6BpMtD1crBkcSxt-ssJIFIZv43UDqLME8FF0fgkoA,2104
|
|
13
|
-
sqlshell/resources/splash_screen.gif,sha256=H24DQBdK1EsqQTWZkgInjM5ouOzY4cMesUoza10auNg,3070484
|
|
14
|
-
sqlshell/sqlshell/__init__.py,sha256=6Wp5nabfTzH5rkC-2jYo_ZjCuw8utmj21Jpy8vBuliI,100
|
|
15
|
-
sqlshell/sqlshell/create_test_data.py,sha256=TFXgWeK1l3l_c4Dg38yS8Df4sBUfOZcBucXngtpThvk,4624
|
|
16
|
-
sqlshell/sqlshell/create_test_databases.py,sha256=oqryFJJahqLFsAjBFM4r9Fe1ea7djDcRpT9U_aBf7PU,3573
|
|
17
|
-
sqlshell-0.1.8.dist-info/METADATA,sha256=bIt-ocCENwgCT7ZxBMOUOaABM0PWonDQ7x2rYy2j2fU,3323
|
|
18
|
-
sqlshell-0.1.8.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
19
|
-
sqlshell-0.1.8.dist-info/entry_points.txt,sha256=Kd0fOvyOW7UiTgTVY7abVOmDIH2Y2nawGTp5kVadac4,44
|
|
20
|
-
sqlshell-0.1.8.dist-info/top_level.txt,sha256=ahwsMFhvAqI97ZkT2xvHL5iZCO1p13mNiUOFkdSFwms,9
|
|
21
|
-
sqlshell-0.1.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|