apswutils
A fork of sqlite-minutils for apsw
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 on this page — 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
apswutils on PyPI
pip
pip install apswutilsuv
uv add apswutilspoetry
poetry add apswutilsInstalling 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 the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — fastcore, apsw |
| Maintenance | actively maintained — 239 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 732,203/month — #5,202 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: apswutils-0.1.2-py3-none-any.whl
Keywords: nbdev, jupyter, notebook, python, sqlite, apsw
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
apswAPSW is a Python wrapper around SQLite's…
unclear · top 5,000 on PyPI
fastlitefastlite wraps sqlite-utils to provide…
permissive · top 15,000 on PyPI
sqlite-utilsCLI tool and Python library for creating,…
permissive · top 5,000 on PyPI
aiosqliteaiosqlite provides an async interface to SQLite…
permissive · top 1,000 on PyPI
aiosqlLoad SQL queries from files and call them as…
permissive · top 15,000 on PyPI
sqlitedictProvides a dict-like interface to SQLite…
permissive · top 5,000 on PyPI
sqlite-migrateA compatibility shim that re-exports the…
permissive · top 15,000 on PyPI
oslo.dboslo.db provides database connectivity and ORM…
permissive · top 15,000 on PyPI
anysqliteAnysqlite wraps SQLite with an async/await…
unclear · top 5,000 on PyPI
dirsqlWatches a local directory, indexes structured…
permissive · top 15,000 on PyPI