--- id: apsw version: "3.53.4.0" license: any-OSI license_treatment: unclear maintenance: active --- # apsw — Another Python SQLite Wrapper License: unclear · Maintenance: active · Downloads: 2.6M/mo ## What it is and what it does APSW is a complete Python binding to SQLite's C API, designed for developers who want to use SQLite's full feature set rather than just basic SQL operations. Unlike the standard library's sqlite3 module, APSW exposes advanced capabilities including full-text search, virtual tables, custom virtual file systems (VFS), JSON operations, and CArray support. It stays synchronized with both SQLite and Python releases. The package supports both synchronous code and async frameworks (AsyncIO, Trio, AnyIO). It has no runtime dependencies and is distributed as prebuilt wheels for CPython 3.10+ across multiple architectures. The project is actively maintained, with a recent release and an engaged community. The trade-off is that it requires a C compiler if building from source, though wheels eliminate this for most users. Use it for: - Building applications that need SQLite's full-text search or JSON query capabilities beyond standard SQL. - Implementing custom virtual tables or file system layers for specialized data access patterns. - Writing async database code that integrates with AsyncIO, Trio, or other async frameworks. - Replacing sqlite3 when you need lower-level control over SQLite's C API or want to stay current with SQLite releases. - Developing embedded database features in Python applications where SQLite's advanced features are required. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. APSW is a Python wrapper around SQLite's complete C API, providing access to advanced SQLite features like full-text search, virtual tables, VFS, JSON support, and async framework integration. Yes, if you need SQLite's advanced features (full-text search, virtual tables, VFS, JSON) or want tighter control over the C API. The active maintenance, wide platform support via prebuilt wheels, and zero runtime dependencies make it a solid choice. The unclear license treatment warrants a quick check before use in proprietary projects. If you only need basic SQL operations, the standard library sqlite3 module is simpler. ## Install pip install apsw uv add apsw poetry add apsw ## Installing apsw Before you install: Medium install friction due to compiled C extension; however, prebuilt wheels are available for CPython 3.10+ across major platforms (macOS, Linux, Windows, ARM variants), and the project is actively maintained with a recent release. License in practice: License treatment is unclear—the package states it uses 'any OSI approved open source license' but provides no specific SPDX identifier. Verify the actual license terms in the repository before adopting in proprietary or restricted-license contexts. Quickstart: import apsw conn = apsw.Connection(':memory:') cursor = conn.cursor() cursor.execute('CREATE TABLE test (id INTEGER, name TEXT)') cursor.execute('INSERT INTO test VALUES (1, "example")') for row in cursor.execute('SELECT * FROM test'): print(row) Requires CPython 3.10 or later; compiled extension requires a C compiler if building from source (prebuilt wheels available for common platforms). Verify before relying: - Whether the 'any OSI approved open source license' phrasing means the license is user-selectable or if a specific license applies. - Performance characteristics compared to the standard library sqlite3 module for typical workloads. - Stability and compatibility guarantees for async framework support across different Python async libraries. ## Package facts - License: any-OSI (unclear) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 2.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlite wrapper python, sqlite full text search, sqlite virtual tables, sqlite async python, sqlite c api bindings, sqlite vfs python, sqlite json support, sqlite-binding, async-support, c-extension [View on SkillFed](https://skillfed.io/packages/apsw) · [View on PyPI](https://pypi.org/project/apsw/)