Metadata-Version: 2.5
Name: sqlite-workbench
Version: 0.1.1
Summary: A responsive desktop workbench for SQLite databases
Project-URL: Homepage, https://pypi.org/project/sqlite-workbench/
Author: SQLite Workbench contributors
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications :: Qt
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Database :: Front-Ends
Requires-Python: >=3.10
Requires-Dist: openpyxl>=3.1
Requires-Dist: pyside6>=6.6
Requires-Dist: sqlparse>=0.5
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest-qt>=4.4; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: twine>=5.1; extra == 'dev'
Description-Content-Type: text/markdown

# SQLite Workbench

## Overview

SQLite Workbench is a responsive PySide6 desktop application and Python package for working with
SQLite databases. Slow operations run outside the GUI thread, and large views use bounded chunks
or pagination instead of loading complete datasets into memory.

## Features

- Create, open, inspect, attach, back up, and restore SQLite databases
- Browse tables, views, indexes, triggers, columns, foreign keys, and DDL
- Use multiple SQL tabs with syntax highlighting, autocomplete, formatting, history, and query plans
- Execute selections, individual statements, or atomic multi-statement scripts
- Browse and edit paginated table data using complete primary keys for safe UPDATE and DELETE
- Import CSV and Excel files transactionally in chunks
- Export queries and tables as CSV, Excel, JSON, JSON Lines, or SQL dumps
- Run integrity checks, VACUUM, ANALYZE, supported PRAGMAs, and database-wide searches in workers
- Switch between system, light, and dark themes
- Restore sessions and autosaved SQL after an unexpected shutdown
- Inspect BLOB values as bounded hex/text previews or recognized images

## Installation

```bash
pip install sqlite-workbench
```

For development:

```bash
git clone <repository-url>
cd sqlite-workbench
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
```

On Windows, activate the environment with `.venv\Scripts\activate`.

## Usage

```bash
sqlite-workbench example.db
```

Use `Ctrl+Enter` for the selection/current statement and `F5` for the complete SQL tab. Open
database objects from Database Explorer; `Ctrl+P` searches tables and columns.

## CLI

```text
sqlite-workbench [--readonly] [database]
```

```bash
sqlite-workbench
sqlite-workbench example.sqlite
sqlite-workbench --readonly production.db
python -m sqlite_workbench example.db
```

## Python API

```python
from sqlite_workbench import Database

db = Database("example.db")
db.initialize()
tables = db.tables()
result = db.execute("SELECT * FROM customers WHERE country = ?", ["PL"])
```

The supported public exports are `Database`, `QueryResult`, and `SQLiteWorkbenchError`.

## Screenshots

Screenshots will be added after final visual review. No screenshot assets are currently included.

## Development

The `src/` package separates `core`, `gui`, `models`, `workers`, `importers`, `exporters`, and
`utils`. Install it in editable mode with `python -m pip install -e ".[dev]"`.

## Testing

```bash
pytest
ruff check .
QT_QPA_PLATFORM=offscreen pytest
```

## Building

```bash
python -m build
twine check dist/*
```

The build creates a wheel and source distribution under `dist/`.

## Publishing to PyPI

TestPyPI is recommended before production:

```bash
python -m twine upload --repository testpypi dist/*
python -m twine upload dist/*
```

Publishing requires owner credentials and must be performed explicitly by the owner.

## License

SQLite Workbench is distributed under the MIT License. See [LICENSE](LICENSE).
