Registry / database / requery-sqlite

requery-sqlite

JSON →
library0.21.0jsnpmunverified

Requery SQLite is the SQLite dialect and backend for Requery, a typed SQL query builder for Python. Version 0.21.0 provides a synchronous SQLite interface with connection management, query execution, and type-safe row mapping. It integrates tightly with Requery's expression system, enabling composable queries compiled to SQLite-specific SQL. Released regularly alongside Requery core, it differentiates by offering compile-time type checking without an ORM overhead, targeting developers who want SQLite access with Python type safety.

npm install requery-sqlite
INSTALL
IMPORT
SIG · REQUERY-SQLITE
R
requery-sqlite
databasejavascriptv0.21.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

connect
from requery_sqlite import connect
import requery_sqlite
The main entry point to create a database connection
Database
from requery_sqlite import Database
Class representing a SQLite database connection
sqlite3
import sqlite3 as db
from requery_sqlite import sqlite3
Requery SQLite exposes the underlying sqlite3 module as a public attribute; but typical usage uses the `connect` function

Shows how to create an in-memory database, define a table, insert data, and run a typed SELECT query with Requery SQLite.

from requery_sqlite import connect db = connect(':memory:') from requery import ( Table, Column, Integer, Text, select, ) users = Table('users', Column('id', Integer, primary_key=True), Column('name', Text), Column('email', Text), ) db.execute(users.create()) query = select(users.c.name, users.c.email).where(users.c.id == 1) result = db.execute(query) row = result.one() print(row.name, row.email)
Debug
Known issues
breakingRequery SQLite requires Python 3.8 or higher.
fix
Upgrade Python to 3.8+.
affects: >=0.21.0
breakingDatabase connections are not thread-safe by default.
fix
Use a connection pool or ensure single-threaded access.
affects: >=0.1.0
gotchaThe connect() function returns a synchronous connection; asynchronous usage is not supported yet.
fix
Use requery-sqlite only in synchronous contexts.
affects: >=0.21.0
deprecatedThe old requery.sqlite module is deprecated; use requery_sqlite package instead.
fix
Replace 'from requery.sqlite import ...' with 'from requery_sqlite import ...'.
affects: >=0.20.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'requery_sqlite'
Package not installed or installed under different name.
fix
Install the package: pip install requery-sqlite
TypeError: 'Database' object is not callable
Using Database class directly instead of connect function.
fix
Use connect() to create a database instance.
AttributeError: 'NoneType' object has no attribute 'fetchall'
Executing a DDL statement (e.g., CREATE TABLE) and trying to fetch results.
fix
Use db.execute() for DDL without expecting a row result; for queries, ensure SELECT statements are used.
Upgrade
Version history
0.21.0latest on npm
Audit
Dependencies
requeryrequiredCore library providing the query builder and expression system
Agent activity
6 hits · last 30 days
node
6
Resources
requery-sqlite — npm install requery-sqlite · libregistry