Metadata-Version: 2.4
Name: jpy-sync-db-lite
Version: 2025.5.0
Summary: Jim's Python - Synchronous Database Wrapper for SQLite
Author: Jim Schilling
Maintainer: Jim Schilling
License-Expression: MIT
Project-URL: Homepage, https://github.com/jim-schilling/jpy-sync-db-lite
Project-URL: Repository, https://github.com/jim-schilling/jpy-sync-db-lite.git
Project-URL: Documentation, https://github.com/jim-schilling/jpy-sync-db-lite#readme
Project-URL: Bug Tracker, https://github.com/jim-schilling/jpy-sync-db-lite/issues
Project-URL: Changelog, https://github.com/jim-schilling/jpy-sync-db-lite/blob/main/CHANGELOG.md
Keywords: sqlite,database,synchronous,threading,sqlalchemy,orm
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sqlalchemy<3.0,>=2.0.37
Requires-Dist: sqlparse<1.0,>=0.4.0
Provides-Extra: dev
Requires-Dist: pytest<8.0,>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov<5.0,>=4.1.0; extra == "dev"
Requires-Dist: pytest-mock<4.0,>=3.11.0; extra == "dev"
Requires-Dist: pytest-xdist<4.0,>=3.3.0; extra == "dev"
Requires-Dist: coverage[toml]<8.0,>=7.3.0; extra == "dev"
Requires-Dist: mypy<2.0,>=1.5.0; extra == "dev"
Requires-Dist: ruff<1.0,>=0.1.0; extra == "dev"
Requires-Dist: isort<6.0,>=5.12.0; extra == "dev"
Requires-Dist: bandit[toml]<2.0,>=1.7.0; extra == "dev"
Requires-Dist: pre-commit<4.0,>=3.4.0; extra == "dev"
Requires-Dist: types-setuptools<69.0,>=68.0.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest<8.0,>=7.4.0; extra == "test"
Requires-Dist: pytest-cov<5.0,>=4.1.0; extra == "test"
Requires-Dist: pytest-mock<4.0,>=3.11.0; extra == "test"
Requires-Dist: pytest-xdist<4.0,>=3.3.0; extra == "test"
Requires-Dist: coverage[toml]<8.0,>=7.3.0; extra == "test"
Provides-Extra: lint
Requires-Dist: ruff<1.0,>=0.1.0; extra == "lint"
Requires-Dist: isort<6.0,>=5.12.0; extra == "lint"
Requires-Dist: bandit[toml]<2.0,>=1.7.0; extra == "lint"
Provides-Extra: type
Requires-Dist: mypy<2.0,>=1.5.0; extra == "type"
Requires-Dist: types-setuptools<69.0,>=68.0.0; extra == "type"
Dynamic: license-file

# jpy-sync-db-lite

Jim's Python - Synchronous Database Wrapper for SQLite

A lightweight, thread-safe SQLite database wrapper built on SQLAlchemy with optimized performance for concurrent operations.

## Features

- **Thread-safe operations** via a single persistent connection protected by locks
- **SQLAlchemy 2.0+ compatibility** with modern async patterns
- **Performance optimized** with SQLite-specific pragmas
- **Simple API** for common database operations
- **Consolidated operations** for both single and bulk operations
- **Batch SQL execution** for multiple statements in a single operation
- **Transaction support** for complex operations
- **Statistics tracking** for monitoring performance
- **Robust SQL parsing** using sqlparse library for reliable statement parsing
- **SQLite-specific management** with VACUUM, ANALYZE, integrity checks, and PRAGMA configuration
- **Database optimization tools** for performance tuning and maintenance
- **Enhanced error handling** with SQLite-specific exception types

## Quick Start

```python
from jpy_sync_db_lite.db_engine import DbEngine

with DbEngine('sqlite:///my_database.db') as db:
    # Create table
    db.execute("""
        CREATE TABLE users (
            id INTEGER PRIMARY KEY,
            name TEXT NOT NULL,
            email TEXT UNIQUE
        )
    """)

    # Insert data
    db.execute(
        "INSERT INTO users (name, email) VALUES (:name, :email)",
        {"name": "John Doe", "email": "john@example.com"}
    )

    # Query data
    users = db.fetch("SELECT * FROM users")
    print(users)
```

## Documentation

For detailed documentation including API reference, installation instructions, and examples, see [docs/README-details.md](docs/README-details.md).
