# splurge-sql-runner
[](https://pypi.org/project/splurge-sql-runner/)
[](https://pypi.org/project/splurge-sql-runner/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/jim-schilling/splurge-sql-runner/actions/workflows/ci-quick-test.yml)
[](https://github.com/jim-schilling/splurge-sql-runner)
[](https://github.com/astral-sh/ruff)
[](https://mypy-lang.org/)
A robust, secure, and user-friendly Python utility for executing SQL files against databases with support for multiple statements, comments, and formatted results.
## ✨ Key Features
- **🔧 Multi-Statement Execution**: Process SQL files containing multiple statements
- **🗄️ Database Agnostic**: Support for SQLite, PostgreSQL, MySQL, Oracle, and more
- **🔒 Security First**: Configurable validation for SQL content and database URLs
- **📊 Smart Output**: Pretty tables, JSON format, and verbose logging
- **⚙️ Flexible Configuration**: CLI args, JSON files, and environment variables
- **🛡️ Error Recovery**: Continue processing on errors with detailed reporting
## 🚀 Quick Start
### Installation
```bash
pip install splurge-sql-runner
```
### Basic Usage
```bash
# Execute a single SQL file
splurge-sql-runner -c "sqlite:///database.db" -f "script.sql"
# Execute multiple SQL files using a pattern
splurge-sql-runner -c "sqlite:///database.db" -p "*.sql"
# With verbose output
splurge-sql-runner -c "sqlite:///database.db" -f "script.sql" -v
# JSON output for scripting
splurge-sql-runner -c "sqlite:///database.db" -f "query.sql" --json
```
## 📚 Documentation
- **[📖 Detailed Documentation](docs/README-DETAILS.md)** - Complete feature guide, configuration options, and examples
- **[🔧 CLI Reference](docs/cli/CLI-REFERENCE.md)** - Comprehensive command-line options and usage
- **[📋 Changelog](CHANGELOG.md)** - Version history and release notes
## 📋 Requirements
- **Python**: 3.10 or higher
- **SQLAlchemy**: Database connectivity
- **splurge-safe-io**: Secure file I/O operations
## 🤝 Contributing
We welcome contributions! Please see our [detailed documentation](docs/README-DETAILS.md#contributing) for development setup and contribution guidelines.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
*For the complete documentation, visit [docs/README-DETAILS.md](docs/README-DETAILS.md)*
Raw data
{
"_id": null,
"home_page": null,
"name": "splurge-sql-runner",
"maintainer": "Jim Schilling",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "sql, database, cli, sqlalchemy, sqlite, postgresql, mysql",
"author": "Jim Schilling",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e3/93/fef89614a65f32a4ce13f6153092d58575d78df44986de8ad08acd8f62a3/splurge_sql_runner-2025.5.1.tar.gz",
"platform": null,
"description": "# splurge-sql-runner\r\n\r\n[](https://pypi.org/project/splurge-sql-runner/)\r\n[](https://pypi.org/project/splurge-sql-runner/)\r\n[](https://opensource.org/licenses/MIT)\r\n\r\n[](https://github.com/jim-schilling/splurge-sql-runner/actions/workflows/ci-quick-test.yml)\r\n[](https://github.com/jim-schilling/splurge-sql-runner)\r\n[](https://github.com/astral-sh/ruff)\r\n[](https://mypy-lang.org/)\r\n\r\n\r\nA robust, secure, and user-friendly Python utility for executing SQL files against databases with support for multiple statements, comments, and formatted results.\r\n\r\n## \u2728 Key Features\r\n\r\n- **\ud83d\udd27 Multi-Statement Execution**: Process SQL files containing multiple statements\r\n- **\ud83d\uddc4\ufe0f Database Agnostic**: Support for SQLite, PostgreSQL, MySQL, Oracle, and more\r\n- **\ud83d\udd12 Security First**: Configurable validation for SQL content and database URLs\r\n- **\ud83d\udcca Smart Output**: Pretty tables, JSON format, and verbose logging\r\n- **\u2699\ufe0f Flexible Configuration**: CLI args, JSON files, and environment variables\r\n- **\ud83d\udee1\ufe0f Error Recovery**: Continue processing on errors with detailed reporting\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n### Installation\r\n\r\n```bash\r\npip install splurge-sql-runner\r\n```\r\n\r\n### Basic Usage\r\n\r\n```bash\r\n# Execute a single SQL file\r\nsplurge-sql-runner -c \"sqlite:///database.db\" -f \"script.sql\"\r\n\r\n# Execute multiple SQL files using a pattern\r\nsplurge-sql-runner -c \"sqlite:///database.db\" -p \"*.sql\"\r\n\r\n# With verbose output\r\nsplurge-sql-runner -c \"sqlite:///database.db\" -f \"script.sql\" -v\r\n\r\n# JSON output for scripting\r\nsplurge-sql-runner -c \"sqlite:///database.db\" -f \"query.sql\" --json\r\n```\r\n\r\n## \ud83d\udcda Documentation\r\n\r\n- **[\ud83d\udcd6 Detailed Documentation](docs/README-DETAILS.md)** - Complete feature guide, configuration options, and examples\r\n- **[\ud83d\udd27 CLI Reference](docs/cli/CLI-REFERENCE.md)** - Comprehensive command-line options and usage\r\n- **[\ud83d\udccb Changelog](CHANGELOG.md)** - Version history and release notes\r\n\r\n## \ud83d\udccb Requirements\r\n\r\n- **Python**: 3.10 or higher\r\n- **SQLAlchemy**: Database connectivity\r\n- **splurge-safe-io**: Secure file I/O operations\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nWe welcome contributions! Please see our [detailed documentation](docs/README-DETAILS.md#contributing) for development setup and contribution guidelines.\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n---\r\n\r\n*For the complete documentation, visit [docs/README-DETAILS.md](docs/README-DETAILS.md)*\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python utility for executing SQL files against databases with support for multiple statements, comments, and pretty-printed results",
"version": "2025.5.1",
"project_urls": {
"Changelog": "https://github.com/jim-schilling/splurge-sql-runner/blob/main/README.md#changelog",
"Documentation": "https://github.com/jim-schilling/splurge-sql-runner#readme",
"Homepage": "https://github.com/jim-schilling/splurge-sql-runner",
"Issues": "https://github.com/jim-schilling/splurge-sql-runner/issues",
"Repository": "https://github.com/jim-schilling/splurge-sql-runner.git"
},
"split_keywords": [
"sql",
" database",
" cli",
" sqlalchemy",
" sqlite",
" postgresql",
" mysql"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "faa70152723b4ff825b891d4a508b01e667bf7dba88992bd872d8a5855646eed",
"md5": "12fb6da8cdc8cf55be711ce1df5ba3c9",
"sha256": "f6667c038a38d0837ae121966eb8d7226743bcb09ddb071238dbcf10cb327ad5"
},
"downloads": -1,
"filename": "splurge_sql_runner-2025.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "12fb6da8cdc8cf55be711ce1df5ba3c9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 41013,
"upload_time": "2025-10-20T01:30:16",
"upload_time_iso_8601": "2025-10-20T01:30:16.320474Z",
"url": "https://files.pythonhosted.org/packages/fa/a7/0152723b4ff825b891d4a508b01e667bf7dba88992bd872d8a5855646eed/splurge_sql_runner-2025.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e393fef89614a65f32a4ce13f6153092d58575d78df44986de8ad08acd8f62a3",
"md5": "aab973d7f7bfc7f50702beca1eafe080",
"sha256": "f33787eefce5c951e69c2ba8cbb5258088725f8bc9a7739349f7080c252166fb"
},
"downloads": -1,
"filename": "splurge_sql_runner-2025.5.1.tar.gz",
"has_sig": false,
"md5_digest": "aab973d7f7bfc7f50702beca1eafe080",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 33885,
"upload_time": "2025-10-20T01:30:17",
"upload_time_iso_8601": "2025-10-20T01:30:17.505990Z",
"url": "https://files.pythonhosted.org/packages/e3/93/fef89614a65f32a4ce13f6153092d58575d78df44986de8ad08acd8f62a3/splurge_sql_runner-2025.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-20 01:30:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jim-schilling",
"github_project": "splurge-sql-runner",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "splurge-sql-runner"
}