<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/apsw-another-python-sqlite-wrapper-rstsycgg9" -->

---
title: apsw: Another Python SQLite Wrapper | daily.dev
description: APSW (Another Python SQLite Wrapper) is a Python library that exposes the full SQLite C API to Python, supporting CPython 3.10 onward. It covers advanced...
canonical: https://daily.dev/posts/apsw-another-python-sqlite-wrapper-rstsycgg9
copyright: © 2026 Daily Dev Ltd.
terms: https://daily.dev/tos/
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: apsw: Another Python SQLite Wrapper | daily.dev
og:description: APSW (Another Python SQLite Wrapper) is a Python library that exposes the full SQLite C API to Python, supporting CPython 3.10 onward. It covers advanced...
og:url: https://daily.dev/posts/apsw-another-python-sqlite-wrapper-rstsycgg9
og:image: https://api.daily.dev/og/posts/rstsYCGG9.png
og:image:alt: apsw: Another Python SQLite Wrapper
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# apsw: Another Python SQLite Wrapper

**[Hacker News](https://daily.dev/sources/hn)** · 2 min read · 1 upvotes · 0 comments

## Summary

APSW (Another Python SQLite Wrapper) is a Python library that exposes the full SQLite C API to Python, supporting CPython 3.10 onward. It covers advanced SQLite features like full text search, sessions, virtual tables, VFS, JSON, and CArray, with support for both synchronous code and async frameworks. The project recommends using the builtin sqlite3 module if interchangeability with other database drivers is desired, and APSW when full SQLite functionality and improved developer experience are the goal. Releases are distributed via PyPI and GitHub, with documentation, changelogs, and a mailing list/discussion group for support.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/rogerbinns/apsw>

## Questions this post answers

### What is the difference between APSW and Python's built-in sqlite3 module?

APSW exposes the complete SQLite C API for full functionality and an improved developer experience, while sqlite3 aims to make SQLite appear interchangeable with other database drivers via the DB-API. APSW supports advanced SQLite features like full text search, sessions, virtual tables, VFS, JSON, and CArray, plus async framework support, which sqlite3 does not expose.

_Developers choosing a SQLite interface in Python can compare trade-offs like this one on daily.dev._

### Which Python versions does the APSW SQLite wrapper support?

APSW supports CPython 3.10 and onward. It is designed to stay current with both SQLite and Python C API changes, gluing together the full SQLite C API with Python's C API for maximum functionality.

_Teams picking SQLite libraries for newer Python versions can track compatibility details on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 2 discussions and 19 comments across hackernews (as of 2026-10-12).

**TL;DR:** Developers largely praise apsw for exposing full SQLite functionality and better transactional semantics than the stdlib sqlite3 module, with some noting it's a long-established, actively maintained project rather than a new release.

**Sentiment:** 60% positive · 30% mixed · 10% skeptical

**The case for**

- Provides saner transactional semantics and nested transaction support compared to stdlib sqlite3.
- Several people report it just works better than sqlite3 for real projects and switched to using it by default.
- The maintainer is praised as responsive and the project has a strong track record.
- Available in Debian as a packaged dependency.

**The pushback**

- Some pointed out the project has existed for years, pushing back on it being presented as new.
- stdlib's generic DBAPI interface is seen as weak for actually swapping databases in practice, raising questions about whether that tradeoff is worth it.
- One person struggled to get column names from the cursor when a query returns no rows.

**By community**

- hackernews (positive): Most commenters praise the library's SQLite-specific ergonomics and transaction handling, with a side debate about whether it's fairly described as 'new'.

**Hottest debate:** Whether framing apsw as new/noteworthy is fair given it's a long-running, actively maintained project.

**Open questions**

- Is there a recommended way to get column names from the cursor when a query returns no rows?

**Highlights**

> In a sentence, I'd say apsw is "the SQLite lover's SQLite library". The python stdlib one tries to provide a generic interface ("DBAPI") which is great if you want to be able to swap to a different database engine later, but it's bad for actually getting the most out of SQLite.
> — [Retr0id on hackernews · 2 comments](https://news.ycombinator.com/item?id=50046583)

> This library is great, and recently saved a project of mine. Figuring out what was going on with some of python's sqlite3 quirks was too much of a hassle, meanwhile this more or less just worked the way I expected it to. Because of this experience I started defaulting to it over sqlite3 for other projects as well. (This documentation page explains the library's intent: https://rogerbinns.github.io/apsw/pysqlite.html)
> — [arc-in-space on hackernews · 1 comments](https://news.ycombinator.com/item?id=50046251)

> If you are used to stdlib but want sane transactional semantics or the ability to easily statically link your own SQLite implementation (eg to have encryption), I’ve written some bindings as well: https://github.com/coleifer/cysqlite This supersedes my earlier pysqlite3 project. Perf is better than stdlib, but not as good as apsw. Roger is doing amazing work and I urge anyone wanting to fully utilize SQLite to try apsw. It does everything, exposes all API surfaces, and has a fantastic track record.
> — [cleifer on hackernews](https://news.ycombinator.com/item?id=50050190)

> It's not even that good for switching to different engines. My normal mode of operation is via postgres(I like the functions better than sqlite) But for a recent little program thought it would be nice to have it a little more self contained and allow for a sqlite db if wanted. Ignoring the the sql differences(Remember, I use postgres for it's functions, so there were many) sqlite uses a different parameter style(I ended up writing an automatic converter to transform my psycopg3 style "%(name)s" to sqlite3's ":name") and I had got in the (perhaps bad) habit of keeping an open connection and using a context manager on the cursor where sqlite does not like that and really wants the context manager on the connection. The final hoop to jump through was getting the row output as a dict. Not super relevant as it is not default on psycopg either, but it takes a bit more effort on sqlite3. So yes it is possible to make the database swapable, But even with the dbapi, it is not trivial.
> — [somat on hackernews](https://news.ycombinator.com/item?id=50049871)

> Abandonware!
> — [arcanemachiner on hackernews](https://news.ycombinator.com/item?id=50046511)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=41476520) · 3 points · 0 comments
- [hackernews](https://news.ycombinator.com/item?id=50045273) · 77 points · 19 comments

## Similar posts on daily.dev

- [Python picks up speed with a new JIT](https://daily.dev/posts/python-picks-up-speed-with-a-new-jit-0tjkgluas) · InfoWorld · 0 upvotes · 0 comments
- [Release 1.7.0 of python-sql](https://daily.dev/posts/release-1-7-0-of-python-sql-6hdaelmrs) · Planet Python · 0 upvotes · 0 comments
- [Introduction to Python SQL Libraries Quiz – Real Python](https://daily.dev/posts/introduction-to-python-sql-libraries-quiz-real-python-ugdinsztm) · Real Python · 1 upvotes · 0 comments
- [Maxteabag/sqlit: A user friendly TUI for SQL databases. Written in python. Supports SQL server, Mysql, PostreSQL and SQLite, Turso and more.](https://daily.dev/posts/maxteabag-sqlit-a-user-friendly-tui-for-sql-databases-written-in-python-supports-sql-server-mysq-mkcifza37) · Hacker News · 0 upvotes · 0 comments
- [sqlite-utils 4.0, now with database schema migrations](https://daily.dev/posts/sqlite-utils-4-0-now-with-database-schema-migrations-cco2twstz) · Simon Willison · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#c](https://daily.dev/tags/c), [#sql](https://daily.dev/tags/sql), [#sqlite](https://daily.dev/tags/sqlite)

[View this post on daily.dev](https://daily.dev/posts/apsw-another-python-sqlite-wrapper-rstsycgg9)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"apsw: Another Python SQLite Wrapper","url":"https://daily.dev/posts/apsw-another-python-sqlite-wrapper-rstsycgg9","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/apsw-another-python-sqlite-wrapper-rstsycgg9"},"datePublished":"2026-10-11T23:19:02.117Z","dateModified":"2026-10-12T10:19:36.690Z","description":"APSW (Another Python SQLite Wrapper) is a Python library that exposes the full SQLite C API to Python, supporting CPython 3.10 onward. It covers advanced...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9f576b5e3df6d52f7156d29f1b6b14d2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9f576b5e3df6d52f7156d29f1b6b14d2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/apsw-another-python-sqlite-wrapper-rstsycgg9","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,c,sql,sqlite","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"apsw: Another Python SQLite Wrapper"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/apsw-another-python-sqlite-wrapper-rstsycgg9#faq","mainEntity":[{"@type":"Question","name":"What is the difference between APSW and Python's built-in sqlite3 module?","acceptedAnswer":{"@type":"Answer","text":"APSW exposes the complete SQLite C API for full functionality and an improved developer experience, while sqlite3 aims to make SQLite appear interchangeable with other database drivers via the DB-API. APSW supports advanced SQLite features like full text search, sessions, virtual tables, VFS, JSON, and CArray, plus async framework support, which sqlite3 does not expose. Developers choosing a SQLite interface in Python can compare trade-offs like this one on daily.dev."}},{"@type":"Question","name":"Which Python versions does the APSW SQLite wrapper support?","acceptedAnswer":{"@type":"Answer","text":"APSW supports CPython 3.10 and onward. It is designed to stay current with both SQLite and Python C API changes, gluing together the full SQLite C API with Python's C API for maximum functionality. Teams picking SQLite libraries for newer Python versions can track compatibility details on daily.dev."}}]}
```

