jpy-sync-db-lite


Namejpy-sync-db-lite JSON
Version 2025.5.0 PyPI version JSON
download
home_pageNone
SummaryJim's Python - Synchronous Database Wrapper for SQLite
upload_time2025-09-05 08:24:44
maintainerJim Schilling
docs_urlNone
authorJim Schilling
requires_python>=3.10
licenseNone
keywords sqlite database synchronous threading sqlalchemy orm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jpy-sync-db-lite",
    "maintainer": "Jim Schilling",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "sqlite, database, synchronous, threading, sqlalchemy, orm",
    "author": "Jim Schilling",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/8b/ee/837dddb866544e8f77de560d1838f97c3dcdb9154a15fad5e13548cffda5/jpy_sync_db_lite-2025.5.0.tar.gz",
    "platform": null,
    "description": "# jpy-sync-db-lite\r\n\r\nJim's Python - Synchronous Database Wrapper for SQLite\r\n\r\nA lightweight, thread-safe SQLite database wrapper built on SQLAlchemy with optimized performance for concurrent operations.\r\n\r\n## Features\r\n\r\n- **Thread-safe operations** via a single persistent connection protected by locks\r\n- **SQLAlchemy 2.0+ compatibility** with modern async patterns\r\n- **Performance optimized** with SQLite-specific pragmas\r\n- **Simple API** for common database operations\r\n- **Consolidated operations** for both single and bulk operations\r\n- **Batch SQL execution** for multiple statements in a single operation\r\n- **Transaction support** for complex operations\r\n- **Statistics tracking** for monitoring performance\r\n- **Robust SQL parsing** using sqlparse library for reliable statement parsing\r\n- **SQLite-specific management** with VACUUM, ANALYZE, integrity checks, and PRAGMA configuration\r\n- **Database optimization tools** for performance tuning and maintenance\r\n- **Enhanced error handling** with SQLite-specific exception types\r\n\r\n## Quick Start\r\n\r\n```python\r\nfrom jpy_sync_db_lite.db_engine import DbEngine\r\n\r\nwith DbEngine('sqlite:///my_database.db') as db:\r\n    # Create table\r\n    db.execute(\"\"\"\r\n        CREATE TABLE users (\r\n            id INTEGER PRIMARY KEY,\r\n            name TEXT NOT NULL,\r\n            email TEXT UNIQUE\r\n        )\r\n    \"\"\")\r\n\r\n    # Insert data\r\n    db.execute(\r\n        \"INSERT INTO users (name, email) VALUES (:name, :email)\",\r\n        {\"name\": \"John Doe\", \"email\": \"john@example.com\"}\r\n    )\r\n\r\n    # Query data\r\n    users = db.fetch(\"SELECT * FROM users\")\r\n    print(users)\r\n```\r\n\r\n## Documentation\r\n\r\nFor detailed documentation including API reference, installation instructions, and examples, see [docs/README-details.md](docs/README-details.md).\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Jim's Python - Synchronous Database Wrapper for SQLite",
    "version": "2025.5.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/jim-schilling/jpy-sync-db-lite/issues",
        "Changelog": "https://github.com/jim-schilling/jpy-sync-db-lite/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/jim-schilling/jpy-sync-db-lite#readme",
        "Homepage": "https://github.com/jim-schilling/jpy-sync-db-lite",
        "Repository": "https://github.com/jim-schilling/jpy-sync-db-lite.git"
    },
    "split_keywords": [
        "sqlite",
        " database",
        " synchronous",
        " threading",
        " sqlalchemy",
        " orm"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9d02bb56772b938b92ecacb19257d65446be0d323bc0326f121b717e04f97e35",
                "md5": "701c60af8ea3e62bcedb67168642e9ba",
                "sha256": "816559d191bdfe41c0c63044e2625b4437c48a9a9a11b540b0650f292462f10e"
            },
            "downloads": -1,
            "filename": "jpy_sync_db_lite-2025.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "701c60af8ea3e62bcedb67168642e9ba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 21471,
            "upload_time": "2025-09-05T08:24:43",
            "upload_time_iso_8601": "2025-09-05T08:24:43.172208Z",
            "url": "https://files.pythonhosted.org/packages/9d/02/bb56772b938b92ecacb19257d65446be0d323bc0326f121b717e04f97e35/jpy_sync_db_lite-2025.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8bee837dddb866544e8f77de560d1838f97c3dcdb9154a15fad5e13548cffda5",
                "md5": "9084661633ca7a81b27e8fe4c55b0fbb",
                "sha256": "ad80b91acee13630e586158ac83258277f8af2138c155365dd51489183b3e4d4"
            },
            "downloads": -1,
            "filename": "jpy_sync_db_lite-2025.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9084661633ca7a81b27e8fe4c55b0fbb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 81007,
            "upload_time": "2025-09-05T08:24:44",
            "upload_time_iso_8601": "2025-09-05T08:24:44.423933Z",
            "url": "https://files.pythonhosted.org/packages/8b/ee/837dddb866544e8f77de560d1838f97c3dcdb9154a15fad5e13548cffda5/jpy_sync_db_lite-2025.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-05 08:24:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jim-schilling",
    "github_project": "jpy-sync-db-lite",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jpy-sync-db-lite"
}
        
Elapsed time: 1.88627s