--- id: apswutils version: "0.1.2" license: Apache Software License 2.0 license_treatment: permissive maintenance: active --- # apswutils — A fork of sqlite-minutils for apsw License: permissive · Maintenance: active · Downloads: 732.2K/mo ## What it is and what it does apswutils is a fork of sqlite-minutils adapted to use apsw instead of the standard sqlite3 library. It provides a high-level Python interface for working with SQLite databases, offering classes like Database, Table, View, and Queryable that abstract away raw SQL for common operations like table creation, row insertion, filtering, and transactions. The package is designed for developers who want a more Pythonic way to interact with SQLite without writing raw SQL. It supports features like schema introspection, filtered queries with WHERE clauses, transaction management with rollback capability, and automatic handling of default values including expression-based defaults. Key differences from the original include WAL as the default mode, different error handling that maps to apsw exceptions, and stricter primary key requirements for foreign key targets. Use it for: - Build a lightweight application database layer without a full ORM framework. - Manage SQLite schemas programmatically with automatic table creation and transformation. - Query and filter data with a Pythonic API instead of writing raw SQL strings. - Handle multi-step database operations with explicit transaction control and rollback. - Work with in-memory SQLite databases for testing or temporary data processing. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Python interface for SQLite databases using APSW, with support for table creation, querying, filtering, transactions, and default value handling. Yes, if you need a lightweight SQLite abstraction layer and are comfortable with apsw's error model. The package is actively maintained, has low install friction, carries a permissive license, and has no known vulnerabilities. It's a solid choice for projects that want more than raw SQL but don't need a full ORM. Verify apsw's installation requirements for your platform first. ## Install pip install apswutils uv add apswutils poetry add apswutils ## Installing apswutils Before you install: Low install friction with only two runtime dependencies (fastcore and apsw). The package is actively maintained with recent releases and no known vulnerabilities. License in practice: Licensed under Apache Software License 2.0 (permissive), allowing commercial and private use with minimal restrictions. Quickstart: pip install apswutils from apswutils.db import * db = Database(":memory:") users = Table(db, 'Users') users.create(columns=dict(id=int, name=str, age=int)) users.insert(dict(name='Alice', age=8)) for row in users.rows_where('age > 3'): print(row) Requires Python 3.9 or later; apsw must be installed as a runtime dependency. Verify before relying: - Whether apsw installation requires compilation or system libraries on all platforms. - Performance characteristics compared to other SQLite wrappers for large datasets. - Completeness of feature parity with sqlite-minutils beyond the documented differences. ## Package facts - License: Apache Software License 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 732.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlite orm python, apsw database wrapper, sqlite table abstraction, python sqlite query builder, sqlite transaction management, sqlite-wrapper, apsw-based, lightweight-orm [View on SkillFed](https://skillfed.io/packages/apswutils) · [View on PyPI](https://pypi.org/project/apswutils/)