sqlbench 0.1.5__tar.gz

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.
@@ -0,0 +1,41 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write # required for PyPI Trusted Publishing (OIDC)
11
+
12
+ jobs:
13
+ deploy:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Check out source
18
+ uses: actions/checkout@v4
19
+ with:
20
+ ref: ${{ github.ref }}
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: '3.x'
26
+
27
+ - name: Install build tooling
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ pip install build twine
31
+
32
+ - name: Build distributions
33
+ run: python -m build
34
+
35
+ - name: Verify metadata (twine check)
36
+ run: python -m twine check dist/*
37
+
38
+ - name: Publish to PyPI (Trusted Publishing)
39
+ uses: pypa/gh-action-pypi-publish@release/v1
40
+ with:
41
+ verbose: true
@@ -0,0 +1,43 @@
1
+ # Virtual environment
2
+ venv/
3
+ .venv/
4
+
5
+ # Python
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+ *.so
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # SQLite database
28
+ *.db
29
+
30
+ # IDE
31
+ .idea/
32
+ .vscode/
33
+ *.swp
34
+ *.swo
35
+ *~
36
+
37
+ # OS
38
+ .DS_Store
39
+ Thumbs.db
40
+
41
+ # Environment variables
42
+ .env
43
+ .env.local
@@ -0,0 +1,20 @@
1
+ .PHONY: run install clean
2
+
3
+ VENV := venv
4
+ PYTHON := $(VENV)/bin/python
5
+ PIP := $(VENV)/bin/pip
6
+
7
+ run: $(VENV)
8
+ $(PYTHON) -m sqlbench
9
+
10
+ install: $(VENV)
11
+
12
+ $(VENV): requirements.txt
13
+ python3 -m venv $(VENV)
14
+ $(PIP) install -r requirements.txt
15
+ touch $(VENV)
16
+
17
+ clean:
18
+ rm -rf $(VENV)
19
+ rm -f sqlbench.db
20
+ find . -type d -name __pycache__ -exec rm -rf {} +
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: sqlbench
3
+ Version: 0.1.5
4
+ Summary: A multi-database SQL workbench with support for IBM i, MySQL, and PostgreSQL
5
+ Project-URL: Homepage, https://github.com/jpsteil/sqlbench
6
+ Project-URL: Repository, https://github.com/jpsteil/sqlbench
7
+ Project-URL: Issues, https://github.com/jpsteil/sqlbench/issues
8
+ Author: Jim
9
+ License-Expression: MIT
10
+ Keywords: database,gui,ibmi,mysql,postgresql,sql,workbench
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: X11 Applications
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Database
23
+ Classifier: Topic :: Database :: Front-Ends
24
+ Requires-Python: >=3.9
25
+ Requires-Dist: sqlparse>=0.5.0
26
+ Provides-Extra: all
27
+ Requires-Dist: ibm-db>=3.0.0; extra == 'all'
28
+ Requires-Dist: mysql-connector-python>=8.0.0; extra == 'all'
29
+ Requires-Dist: openpyxl>=3.1.0; extra == 'all'
30
+ Requires-Dist: psycopg2-binary>=2.9.0; extra == 'all'
31
+ Requires-Dist: pyodbc>=4.0.0; extra == 'all'
32
+ Requires-Dist: reportlab>=4.0.0; extra == 'all'
33
+ Provides-Extra: dev
34
+ Requires-Dist: black>=23.0.0; extra == 'dev'
35
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
36
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
37
+ Provides-Extra: export
38
+ Requires-Dist: openpyxl>=3.1.0; extra == 'export'
39
+ Requires-Dist: reportlab>=4.0.0; extra == 'export'
40
+ Provides-Extra: ibmi
41
+ Requires-Dist: pyodbc>=4.0.0; extra == 'ibmi'
42
+ Provides-Extra: ibmi-db
43
+ Requires-Dist: ibm-db>=3.0.0; extra == 'ibmi-db'
44
+ Provides-Extra: mysql
45
+ Requires-Dist: mysql-connector-python>=8.0.0; extra == 'mysql'
46
+ Provides-Extra: postgresql
47
+ Requires-Dist: psycopg2-binary>=2.9.0; extra == 'postgresql'
48
+ Description-Content-Type: text/markdown
49
+
50
+ # SQLBench
51
+
52
+ A multi-database SQL workbench with support for IBM i (AS/400), MySQL, and PostgreSQL.
53
+
54
+ ## Features
55
+
56
+ - Connect to multiple databases simultaneously
57
+ - Browse schemas, tables, and columns
58
+ - Execute SQL queries with syntax highlighting
59
+ - Export results to CSV, Excel, and PDF
60
+ - Save and manage database connections
61
+ - Right-click context menus for quick actions
62
+
63
+ ## Supported Databases
64
+
65
+ - **IBM i (AS/400)** - via ODBC
66
+ - **MySQL** - via mysql-connector-python
67
+ - **PostgreSQL** - via psycopg2
68
+
69
+ ## Installation
70
+
71
+ ```bash
72
+ # Clone the repository
73
+ git clone https://github.com/jsteil/sqlbench.git
74
+ cd sqlbench
75
+
76
+ # Install dependencies
77
+ make install
78
+ ```
79
+
80
+ ## Usage
81
+
82
+ ```bash
83
+ make run
84
+ ```
85
+
86
+ ## Requirements
87
+
88
+ - Python 3.8+
89
+ - tkinter (usually included with Python)
90
+ - For IBM i: IBM i Access ODBC Driver
91
+
92
+ ## License
93
+
94
+ MIT
@@ -0,0 +1,45 @@
1
+ # SQLBench
2
+
3
+ A multi-database SQL workbench with support for IBM i (AS/400), MySQL, and PostgreSQL.
4
+
5
+ ## Features
6
+
7
+ - Connect to multiple databases simultaneously
8
+ - Browse schemas, tables, and columns
9
+ - Execute SQL queries with syntax highlighting
10
+ - Export results to CSV, Excel, and PDF
11
+ - Save and manage database connections
12
+ - Right-click context menus for quick actions
13
+
14
+ ## Supported Databases
15
+
16
+ - **IBM i (AS/400)** - via ODBC
17
+ - **MySQL** - via mysql-connector-python
18
+ - **PostgreSQL** - via psycopg2
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ # Clone the repository
24
+ git clone https://github.com/jsteil/sqlbench.git
25
+ cd sqlbench
26
+
27
+ # Install dependencies
28
+ make install
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ```bash
34
+ make run
35
+ ```
36
+
37
+ ## Requirements
38
+
39
+ - Python 3.8+
40
+ - tkinter (usually included with Python)
41
+ - For IBM i: IBM i Access ODBC Driver
42
+
43
+ ## License
44
+
45
+ MIT
@@ -0,0 +1,77 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "sqlbench"
7
+ version = "0.1.5"
8
+ description = "A multi-database SQL workbench with support for IBM i, MySQL, and PostgreSQL"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ { name = "Jim" }
14
+ ]
15
+ keywords = ["sql", "database", "gui", "ibmi", "mysql", "postgresql", "workbench"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Environment :: X11 Applications",
19
+ "Intended Audience :: Developers",
20
+ "Intended Audience :: System Administrators",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Operating System :: OS Independent",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Topic :: Database",
29
+ "Topic :: Database :: Front-Ends",
30
+ ]
31
+ dependencies = [
32
+ "sqlparse>=0.5.0",
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ mysql = ["mysql-connector-python>=8.0.0"]
37
+ postgresql = ["psycopg2-binary>=2.9.0"]
38
+ ibmi = ["pyodbc>=4.0.0"]
39
+ ibmi-db = ["ibm_db>=3.0.0"]
40
+ export = ["reportlab>=4.0.0", "openpyxl>=3.1.0"]
41
+ all = [
42
+ "mysql-connector-python>=8.0.0",
43
+ "psycopg2-binary>=2.9.0",
44
+ "pyodbc>=4.0.0",
45
+ "ibm_db>=3.0.0",
46
+ "reportlab>=4.0.0",
47
+ "openpyxl>=3.1.0",
48
+ ]
49
+ dev = [
50
+ "pytest>=7.0.0",
51
+ "black>=23.0.0",
52
+ "ruff>=0.1.0",
53
+ ]
54
+
55
+ [project.scripts]
56
+ sqlbench = "sqlbench.__main__:main"
57
+
58
+ [project.urls]
59
+ Homepage = "https://github.com/jpsteil/sqlbench"
60
+ Repository = "https://github.com/jpsteil/sqlbench"
61
+ Issues = "https://github.com/jpsteil/sqlbench/issues"
62
+
63
+ [tool.hatch.build.targets.wheel]
64
+ packages = ["sqlbench"]
65
+ include = ["sqlbench/resources/*"]
66
+
67
+ [tool.ruff]
68
+ line-length = 100
69
+ target-version = "py39"
70
+
71
+ [tool.ruff.lint]
72
+ select = ["E", "F", "W", "I"]
73
+ ignore = ["E501"]
74
+
75
+ [tool.black]
76
+ line-length = 100
77
+ target-version = ["py39"]
@@ -0,0 +1,5 @@
1
+ pyodbc
2
+ reportlab
3
+ openpyxl
4
+ mysql-connector-python
5
+ psycopg2-binary
@@ -0,0 +1,3 @@
1
+ """SQLBench - A multi-database SQL workbench."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,40 @@
1
+ """Entry point for sqlbench."""
2
+
3
+ import sys
4
+
5
+
6
+ def main():
7
+ """Main entry point with argument handling."""
8
+ if len(sys.argv) > 1:
9
+ arg = sys.argv[1].lower()
10
+
11
+ if arg in ("--install-launcher", "--create-launcher"):
12
+ from sqlbench.launcher import create_launcher
13
+ success = create_launcher()
14
+ sys.exit(0 if success else 1)
15
+
16
+ elif arg in ("--remove-launcher", "--uninstall-launcher"):
17
+ from sqlbench.launcher import remove_launcher
18
+ success = remove_launcher()
19
+ sys.exit(0 if success else 1)
20
+
21
+ elif arg in ("--help", "-h"):
22
+ print("SQLBench - Multi-database SQL Workbench")
23
+ print()
24
+ print("Usage: sqlbench [options]")
25
+ print()
26
+ print("Options:")
27
+ print(" --install-launcher Create a desktop launcher for this OS")
28
+ print(" --remove-launcher Remove the desktop launcher")
29
+ print(" --help, -h Show this help message")
30
+ print()
31
+ print("Run without arguments to start the application.")
32
+ sys.exit(0)
33
+
34
+ # Start the GUI application
35
+ from sqlbench.app import main as app_main
36
+ app_main()
37
+
38
+
39
+ if __name__ == "__main__":
40
+ main()