Jim's Python - Synchronous Database Wrapper for SQLite
Project description
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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jpy_sync_db_lite-2025.5.0.tar.gz.
File metadata
- Download URL: jpy_sync_db_lite-2025.5.0.tar.gz
- Upload date:
- Size: 81.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad80b91acee13630e586158ac83258277f8af2138c155365dd51489183b3e4d4
|
|
| MD5 |
9084661633ca7a81b27e8fe4c55b0fbb
|
|
| BLAKE2b-256 |
8bee837dddb866544e8f77de560d1838f97c3dcdb9154a15fad5e13548cffda5
|
File details
Details for the file jpy_sync_db_lite-2025.5.0-py3-none-any.whl.
File metadata
- Download URL: jpy_sync_db_lite-2025.5.0-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
816559d191bdfe41c0c63044e2625b4437c48a9a9a11b540b0650f292462f10e
|
|
| MD5 |
701c60af8ea3e62bcedb67168642e9ba
|
|
| BLAKE2b-256 |
9d02bb56772b938b92ecacb19257d65446be0d323bc0326f121b717e04f97e35
|