sqlshell 0.2.3__py3-none-any.whl → 0.3.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/__init__.py +34 -4
- sqlshell/db/__init__.py +2 -1
- sqlshell/db/database_manager.py +336 -23
- sqlshell/db/export_manager.py +188 -0
- sqlshell/editor_integration.py +127 -0
- sqlshell/execution_handler.py +421 -0
- sqlshell/main.py +570 -140
- sqlshell/query_tab.py +592 -7
- sqlshell/ui/filter_header.py +22 -1
- sqlshell/utils/profile_column.py +1586 -170
- sqlshell/utils/profile_foreign_keys.py +103 -11
- sqlshell/utils/profile_ohe.py +631 -0
- {sqlshell-0.2.3.dist-info → sqlshell-0.3.0.dist-info}/METADATA +126 -7
- {sqlshell-0.2.3.dist-info → sqlshell-0.3.0.dist-info}/RECORD +17 -13
- {sqlshell-0.2.3.dist-info → sqlshell-0.3.0.dist-info}/WHEEL +1 -1
- {sqlshell-0.2.3.dist-info → sqlshell-0.3.0.dist-info}/entry_points.txt +0 -0
- {sqlshell-0.2.3.dist-info → sqlshell-0.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlshell
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A powerful SQL shell with GUI interface for data analysis
|
|
5
5
|
Author: SQLShell Team
|
|
6
6
|
License-Expression: MIT
|
|
@@ -25,21 +25,22 @@ Requires-Dist: fastparquet>=2023.10.1
|
|
|
25
25
|
Requires-Dist: xlrd>=2.0.1
|
|
26
26
|
Requires-Dist: deltalake
|
|
27
27
|
Requires-Dist: Pillow>=10.0.0
|
|
28
|
-
Requires-Dist: shap
|
|
29
28
|
Requires-Dist: xgboost
|
|
30
29
|
Requires-Dist: scikit-learn
|
|
31
30
|
Requires-Dist: matplotlib>=3.10.0
|
|
32
31
|
Requires-Dist: scipy>=1.15.0
|
|
32
|
+
Requires-Dist: seaborn>=0.13.0
|
|
33
|
+
Requires-Dist: nltk>=3.8.1
|
|
33
34
|
|
|
34
35
|
# SQLShell
|
|
35
36
|
|
|
36
37
|
<div align="center">
|
|
37
38
|
|
|
38
|
-
<img src="https://
|
|
39
|
+
<img src="https://raw.githubusercontent.com/oyvinrog/SQLShell/main/assets/images/sqlshell_logo.png" alt="SQLShell Logo" width="180" height="auto">
|
|
39
40
|
|
|
40
41
|
**A powerful SQL shell with GUI interface for data analysis**
|
|
41
42
|
|
|
42
|
-
<img src="https://
|
|
43
|
+
<img src="https://raw.githubusercontent.com/oyvinrog/SQLShell/main/assets/images/sqlshell_demo.png" alt="SQLShell Interface" width="80%" height="auto">
|
|
43
44
|
|
|
44
45
|
</div>
|
|
45
46
|
|
|
@@ -53,9 +54,18 @@ Requires-Dist: scipy>=1.15.0
|
|
|
53
54
|
- **Table Preview** - Quick view of imported data tables
|
|
54
55
|
- **Test Data Generation** - Built-in sample data for testing and learning
|
|
55
56
|
- **Multiple Views** - Support for multiple concurrent table views
|
|
56
|
-
- **Productivity Tools** - Streamlined workflow with
|
|
57
|
+
- **Productivity Tools** - Streamlined workflow with F5/F9 shortcuts and Ctrl+Enter for query execution
|
|
57
58
|
- **Explain Column** - Analyze relationships between data columns directly from query results
|
|
58
59
|
|
|
60
|
+
## ⚡ F5/F9 Quick Execution
|
|
61
|
+
|
|
62
|
+
SQLShell includes powerful keyboard shortcuts for efficient SQL execution:
|
|
63
|
+
|
|
64
|
+
- **F5**: Execute all SQL statements in the editor sequentially
|
|
65
|
+
- **F9**: Execute only the current SQL statement (where your cursor is positioned)
|
|
66
|
+
|
|
67
|
+
This allows for rapid testing and development - place your cursor in any statement and press F9 to execute just that query, or press F5 to run everything.
|
|
68
|
+
|
|
59
69
|
## 📦 Installation
|
|
60
70
|
|
|
61
71
|
### Using pip (Recommended)
|
|
@@ -166,7 +176,7 @@ FROM test_v;
|
|
|
166
176
|
SQLShell provides powerful table profiling tools to help you understand your data. These tools are accessible from the left-hand side table menu via right-click on any table:
|
|
167
177
|
|
|
168
178
|
<div align="center">
|
|
169
|
-
<img src="https://
|
|
179
|
+
<img src="https://raw.githubusercontent.com/oyvinrog/SQLShell/main/assets/images/column_profiler.png" alt="Column Profiler" width="80%" height="auto">
|
|
170
180
|
</div>
|
|
171
181
|
|
|
172
182
|
### Table Profiling Options
|
|
@@ -261,7 +271,50 @@ The Column Profiler now offers in-depth multivariate analysis to explore relatio
|
|
|
261
271
|
- Identify patterns and outliers in multivariate relationships
|
|
262
272
|
- Make better decisions about feature selection for analysis and modeling
|
|
263
273
|
|
|
264
|
-
This feature is particularly useful for
|
|
274
|
+
This feature is particularly useful for data scientists and analysts who need to understand variable relationships quickly without writing complex correlation queries.
|
|
275
|
+
|
|
276
|
+
### One-hot encoding
|
|
277
|
+
|
|
278
|
+
If you are working with text (i.e. job description or job title to analyze salary), you would want to
|
|
279
|
+
do 'one-hot encoding'.
|
|
280
|
+
|
|
281
|
+
1. **How to Access**:
|
|
282
|
+
- Right-click on any column header in the query results table
|
|
283
|
+
- Select "Encode text" from the context menu
|
|
284
|
+
|
|
285
|
+
<div align="center">
|
|
286
|
+
<img src="https://raw.githubusercontent.com/oyvinrog/SQLShell/main/assets/images/column_encoding.png" alt="Column Profiler" width="80%" height="auto">
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
2. **How It Works**:
|
|
290
|
+
- SQLShell tokenizes the text into meaningful words and phrases
|
|
291
|
+
- Each unique token becomes a new binary feature (1 if present, 0 if absent)
|
|
292
|
+
- The system applies intelligent filtering to remove common words with low information value
|
|
293
|
+
- Results appear as a new query with encoded columns automatically added
|
|
294
|
+
|
|
295
|
+
<!-- Screenshot 2: Encoding process/dialog showing options -->
|
|
296
|
+
|
|
297
|
+
3. **Applications**:
|
|
298
|
+
- Analyze how specific keywords in job descriptions correlate with salary levels
|
|
299
|
+
- Identify which terms in product descriptions drive higher sales
|
|
300
|
+
- Extract features from unstructured text for further analysis
|
|
301
|
+
- Prepare text data for statistical modeling and machine learning
|
|
302
|
+
|
|
303
|
+
4. **Using the Encoded Data**:
|
|
304
|
+
- After encoding, SQLShell presents a visualization showing top correlations
|
|
305
|
+
- Sort encoded features by correlation strength to identify key terms
|
|
306
|
+
- Use encoded columns in subsequent queries for deeper analysis
|
|
307
|
+
- Join encoded results with other tables for cross-dataset insights
|
|
308
|
+
|
|
309
|
+
<!-- Screenshot 3: Results showing correlation between job descriptions and salary -->
|
|
310
|
+
|
|
311
|
+
5. **Benefits**:
|
|
312
|
+
- Transform unstructured text into structured, analyzable data
|
|
313
|
+
- Discover hidden patterns between text content and numerical outcomes
|
|
314
|
+
- Identify specific terms that have the strongest relationship with target variables
|
|
315
|
+
- Perform advanced text analysis without specialized NLP knowledge
|
|
316
|
+
|
|
317
|
+
This feature is particularly powerful for HR analytics, marketing text analysis, and any scenario where you need to extract insights from unstructured text data.
|
|
265
318
|
|
|
266
319
|
## 📋 Requirements
|
|
267
320
|
|
|
@@ -279,3 +332,69 @@ This feature is particularly useful for exploratory data analysis, helping you u
|
|
|
279
332
|
## 📄 License
|
|
280
333
|
|
|
281
334
|
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
335
|
+
|
|
336
|
+
## 📁 Project Structure
|
|
337
|
+
|
|
338
|
+
```
|
|
339
|
+
SQLShell/
|
|
340
|
+
├── sqlshell/ # Main package
|
|
341
|
+
│ ├── __init__.py
|
|
342
|
+
│ ├── main.py # Main application entry point
|
|
343
|
+
│ ├── execution_handler.py # F5/F9 SQL execution functionality
|
|
344
|
+
│ ├── editor_integration.py # Editor integration utilities
|
|
345
|
+
│ ├── query_tab.py # Query tab implementation
|
|
346
|
+
│ ├── splash_screen.py # Application splash screen
|
|
347
|
+
│ └── styles.py # UI styling
|
|
348
|
+
├── tests/ # Test files
|
|
349
|
+
│ ├── f5_f9_functionality/ # F5/F9 functionality tests and demos
|
|
350
|
+
│ │ ├── README.md # Documentation for F5/F9 tests
|
|
351
|
+
│ │ ├── test_execution_handler.py # Comprehensive test suite
|
|
352
|
+
│ │ └── demo_f5_f9.py # Interactive demo
|
|
353
|
+
│ └── test_query_executor.py # Other test files
|
|
354
|
+
├── docs/ # Documentation
|
|
355
|
+
│ ├── F5_F9_FUNCTIONALITY.md # Detailed F5/F9 documentation
|
|
356
|
+
│ └── IMPLEMENTATION_SUMMARY.md # Implementation details
|
|
357
|
+
├── assets/ # Assets and resources
|
|
358
|
+
│ └── images/ # Images and screenshots
|
|
359
|
+
│ ├── sqlshell_logo.png
|
|
360
|
+
│ ├── sqlshell_demo.png
|
|
361
|
+
│ ├── column_profiler.png
|
|
362
|
+
│ └── column_encoding.png
|
|
363
|
+
├── sample_data/ # Sample data files
|
|
364
|
+
│ ├── test_*.csv # Test CSV files
|
|
365
|
+
│ ├── california_housing_data.parquet
|
|
366
|
+
│ └── pool.db # Sample database
|
|
367
|
+
├── main.py # Application launcher
|
|
368
|
+
├── run.py # Alternative launcher
|
|
369
|
+
├── README.md # This file
|
|
370
|
+
├── requirements.txt # Python dependencies
|
|
371
|
+
├── pyproject.toml # Project configuration
|
|
372
|
+
└── MANIFEST.in # Package manifest
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
## 🧪 Testing
|
|
376
|
+
|
|
377
|
+
The project includes comprehensive tests for the F5/F9 functionality:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
# Run the interactive test suite
|
|
381
|
+
cd tests/f5_f9_functionality
|
|
382
|
+
python test_execution_handler.py
|
|
383
|
+
|
|
384
|
+
# Try the interactive demo
|
|
385
|
+
python demo_f5_f9.py
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
For complete documentation on F5/F9 functionality, see `docs/F5_F9_FUNCTIONALITY.md`.
|
|
389
|
+
|
|
390
|
+
## 🤝 Contributing
|
|
391
|
+
|
|
392
|
+
1. Fork the repository
|
|
393
|
+
2. Create a feature branch
|
|
394
|
+
3. Make your changes
|
|
395
|
+
4. Add tests if applicable
|
|
396
|
+
5. Submit a pull request
|
|
397
|
+
|
|
398
|
+
## 📄 License
|
|
399
|
+
|
|
400
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
sqlshell/LICENSE,sha256=YFVzvqHDVzBVtEZoKwcHhashVdNy4P7tDEQ561jAdyo,1070
|
|
2
2
|
sqlshell/MANIFEST.in,sha256=UautKSW4Kzjsy1Ti05-P58qRgM4ct4mmG3aserBGaX0,144
|
|
3
3
|
sqlshell/README.md,sha256=_FPMDx0xcXt00Qpodw3JwwNeptE2qT0LUBCdNhEtRsA,1739
|
|
4
|
-
sqlshell/__init__.py,sha256=
|
|
4
|
+
sqlshell/__init__.py,sha256=dCODXgb9N7uXAJ_m7E_HlzZC69WSY7eikF6ABOG1Uhc,1439
|
|
5
5
|
sqlshell/context_suggester.py,sha256=OdfSBqwKWtf6yGj-_cNjf9RZG9cc70TWZ_7ieAVKJqk,33970
|
|
6
6
|
sqlshell/create_test_data.py,sha256=3LzUEbAn7cNgahuivXB7XTnb3osE-n-VPJeoaFBP8tE,6595
|
|
7
7
|
sqlshell/editor.py,sha256=iWSYUtsNCud7HWZrcqD9Ef7FEa0nt7ekeUHV6CmCgao,39635
|
|
8
|
-
sqlshell/
|
|
8
|
+
sqlshell/editor_integration.py,sha256=sZSSwd0vsuV2qlRG1IUlw67y7902Hm75U63YbjKvmWo,4531
|
|
9
|
+
sqlshell/execution_handler.py,sha256=7IwVQz1GiMlXERmdP7CNLtH3SPcjzWon_ywi7vpecz0,15466
|
|
10
|
+
sqlshell/main.py,sha256=d6d_wXergwC-Mx50fi4N2rX-ULidAMvP1l9qoQtlueI,183623
|
|
9
11
|
sqlshell/menus.py,sha256=hiT1CXXnsRKkai7oJlPi94du_GKtIhl5X5LOGvqcOqs,5684
|
|
10
|
-
sqlshell/query_tab.py,sha256=
|
|
12
|
+
sqlshell/query_tab.py,sha256=CjY1B4V7aY0wrFncOevzWWb3G-d_Cl5fgeTD9NG4de8,36820
|
|
11
13
|
sqlshell/splash_screen.py,sha256=K0Ku_nXJWmWSnVEh2OttIthRZcnUoY_tmjIAWIWLm7Y,17604
|
|
12
14
|
sqlshell/sqlshell_demo.png,sha256=dPp9J1FVqQVfrh-gekosuha2Jw2p2--wxbOmt2kr7fg,133550
|
|
13
15
|
sqlshell/styles.py,sha256=EGA_Ow-XerPEQgj82ts3fnqkEPMcjSlJPblbPu9L__s,7135
|
|
@@ -15,8 +17,9 @@ sqlshell/suggester_integration.py,sha256=w3fKuSq5ex5OHxSBzZunyq3mbGvX06-7nxgLCln
|
|
|
15
17
|
sqlshell/syntax_highlighter.py,sha256=mPwsD8N4XzAUx0IgwlelyfjUhe0xmH0Ug3UI9hTcHz0,5861
|
|
16
18
|
sqlshell/table_list.py,sha256=0V2vQXjah8uWdRaRcB0w9WzclaFX5HulCUmmJEjUW8k,41585
|
|
17
19
|
sqlshell/data/create_test_data.py,sha256=sUTcf50V8-bVwYV2VNTLK65c-iHiU4wb99By67I10zM,5404
|
|
18
|
-
sqlshell/db/__init__.py,sha256=
|
|
19
|
-
sqlshell/db/database_manager.py,sha256=
|
|
20
|
+
sqlshell/db/__init__.py,sha256=ww-pZ0_ucFwXpR5KkkLI-heV06tU7FrO6TwuYaCuTKQ,222
|
|
21
|
+
sqlshell/db/database_manager.py,sha256=RiJB42j0TJJocnHP8hvWXuSPqBYLBpg_9hazEcgHifg,52779
|
|
22
|
+
sqlshell/db/export_manager.py,sha256=PpukqPZy68AMR6ds0o9cRK3r_zdBdP-M44neerIbwMs,7295
|
|
20
23
|
sqlshell/resources/__init__.py,sha256=VLTJ_5pUHhctRiV8UZDvG-jnsjgT6JQvW-ZPzIJqBIY,44
|
|
21
24
|
sqlshell/resources/create_icon.py,sha256=O7idVEKwmSXxLUsbeRn6zcYVQLPSdJi98nGamTgXiM4,4905
|
|
22
25
|
sqlshell/resources/create_splash.py,sha256=t1KK43Y0pHKGcdRkbnZgV6_y1c1C0THHQl5_fmpC2gQ,3347
|
|
@@ -30,15 +33,16 @@ sqlshell/sqlshell/create_test_data.py,sha256=TFXgWeK1l3l_c4Dg38yS8Df4sBUfOZcBucX
|
|
|
30
33
|
sqlshell/sqlshell/create_test_databases.py,sha256=oqryFJJahqLFsAjBFM4r9Fe1ea7djDcRpT9U_aBf7PU,3573
|
|
31
34
|
sqlshell/ui/__init__.py,sha256=2CsTDAvRZJ99gkjs3-rdwkxyGVAKXX6ueOhPdP1VXQc,206
|
|
32
35
|
sqlshell/ui/bar_chart_delegate.py,sha256=tbtIt2ZqPIcYWNJzpONpYa0CYURkLdjkg23TI7TmOKY,1881
|
|
33
|
-
sqlshell/ui/filter_header.py,sha256=
|
|
36
|
+
sqlshell/ui/filter_header.py,sha256=s2PfqVTCrQjNOtTYfiR50HL6PIVwlL5kF7lO4PGPTko,18196
|
|
34
37
|
sqlshell/utils/__init__.py,sha256=iPKvOsKcfnV7xvhQVOz8BiQ4kbFZ7PGUW8vg0vyMqvk,225
|
|
35
|
-
sqlshell/utils/profile_column.py,sha256=
|
|
38
|
+
sqlshell/utils/profile_column.py,sha256=QlnjyzFMUNHAKuggMYED0LkDs6BxWe9CnsLEr4rtEWE,113425
|
|
36
39
|
sqlshell/utils/profile_distributions.py,sha256=1AcgubrouKYCiVoXtYz6RVX8kXSp6VaoEoJInXMU0RU,25379
|
|
37
40
|
sqlshell/utils/profile_entropy.py,sha256=pJTcXlBkSEPzL3Fvxizf5gBkw6IsUjfa9Y6MjAqF1do,13238
|
|
38
|
-
sqlshell/utils/profile_foreign_keys.py,sha256=
|
|
41
|
+
sqlshell/utils/profile_foreign_keys.py,sha256=kF4PeJLHXjVPpnLhM7ERlm3Z3r75QgX6a9gpMNWlgjA,23227
|
|
39
42
|
sqlshell/utils/profile_keys.py,sha256=ajdBTqvZVmAlVaY-kDmv_D8D3sKASG75PLTzf8Y8nX4,14170
|
|
40
|
-
sqlshell
|
|
41
|
-
sqlshell-0.
|
|
42
|
-
sqlshell-0.
|
|
43
|
-
sqlshell-0.
|
|
44
|
-
sqlshell-0.
|
|
43
|
+
sqlshell/utils/profile_ohe.py,sha256=yXsYtHnyhtvdBpKvJEqu20e2t4qo0kJE8Rvl0bAogPs,24644
|
|
44
|
+
sqlshell-0.3.0.dist-info/METADATA,sha256=IPsuPMIwGVLLGTGpFo2334uUHhZrWxJIpAOsC1-KAdc,15362
|
|
45
|
+
sqlshell-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
46
|
+
sqlshell-0.3.0.dist-info/entry_points.txt,sha256=Kd0fOvyOW7UiTgTVY7abVOmDIH2Y2nawGTp5kVadac4,44
|
|
47
|
+
sqlshell-0.3.0.dist-info/top_level.txt,sha256=ahwsMFhvAqI97ZkT2xvHL5iZCO1p13mNiUOFkdSFwms,9
|
|
48
|
+
sqlshell-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|