sqlite3
npmv6.0.1TypeScriptAsynchronous, non-blocking SQLite3 bindings
Adopt with care
sqlite3 is usable, with caveats. This package runs an install script on your machine.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 181 days ago.
- BWeight: grade B, Good.
Pulls in 9 transitive packages, about 5.7 MB installed (at least — some of the tree is still being crawled).
- CSupply chain: grade C, Fair — worth a look.
This package runs an install script on your machine.
- ALicense: grade A, Excellent.
BSD-3-Clause — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding sqlite3 to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Licenses in the dependency tree
Every license you inherit by installing sqlite3, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=20.17.0
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- Runs on install
Installing this package executes a script defined by its publisher. That is normal for native modules, but it is also how supply-chain attacks run — review it before installing in CI or on a machine with credentials.
Quick start
A usage example from the sqlite3 README.
const sqlite3 = require('sqlite3').verbose();
const db = new sqlite3.Database(':memory:');
db.serialize(() => {
db.run("CREATE TABLE lorem (info TEXT)");
const stmt = db.prepare("INSERT INTO lorem VALUES (?)");
for (let i = 0; i < 10; i++) {
stmt.run("Ipsum " + i);
}
stmt.finalize();
db.each("SELECT rowid AS id, info FROM lorem", (err, row) => {
console.log(row.id + ": " + row.info);sqlite3 vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| sqlite3this page | 0 | 3 | BSD-3-Clause | 6 months ago |
| better-sqlite3 | 0 | 5 | MIT | 1 day ago |
| drizzle-orm | 19M | 0 | Apache-2.0 | 1 day ago |
| knex | 0 | 1 | MIT | 1 day ago |
| kysely | 15.6M | 1 | MIT | 1 day ago |
| @libsql/client | 2M | 1 | MIT | 1 day ago |
Dependencies
Declared by sqlite3 v6.0.1. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (4)
Peer (1)
Dev (3)
Used by
Popular packages that depend on sqlite3.
Drizzle ORM package for SQL databases
The fastest and simplest library for SQLite in Node.js.
A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3
Relationship graph
Dependencies (left) and dependents (right) of sqlite3.
Frequently installed together
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
PostgreSQL client - pure javascript & libpq with the same API
fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS
The fastest and simplest library for SQLite in Node.js.
TypeScript definitions for pg
Type safe SQL query builder
libSQL driver for TypeScript and JavaScript
TypeScript definitions for better-sqlite3
Public API for OpenTelemetry
AWS SDK for JavaScript Rds Data Client for Node.js, Browser and React Native
TypeScript definitions for node
A Fetch API-compatible PlanetScale database driver
Release history
1 release in the last two years, typically about 8 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 6.0.1latest | 6 months ago | 3.2 MB | BSD-3-Clause |
| 5.1.7 | 2 years ago | 3.2 MB | BSD-3-Clause |
| 5.1.7-rc.0 | 2 years ago | 3.2 MB | BSD-3-Clause |
| 5.1.6 | 3 years ago | 3.1 MB | BSD-3-Clause |
| 5.1.5 | 3 years ago | 3.1 MB | BSD-3-Clause |
| 5.1.4 | 3 years ago | 3.1 MB | BSD-3-Clause |
| 5.1.3 | 3 years ago | 3.1 MB | BSD-3-Clause |
| 5.1.2 | 3 years ago | 3.1 MB | BSD-3-Clause |
| 5.1.1 | 4 years ago | 3.1 MB | BSD-3-Clause |
| 5.1.0 | 4 years ago | 3.1 MB | BSD-3-Clause |
| 5.0.11 | 4 years ago | 3.1 MB | BSD-3-Clause |
| 5.0.10 | 4 years ago | 3.1 MB | BSD-3-Clause |
| 5.0.9 | 4 years ago | 3.1 MB | BSD-3-Clause |
| 5.0.8 | 4 years ago | 3.0 MB | BSD-3-Clause |
| 5.0.7 | 4 years ago | 3.0 MB | BSD-3-Clause |
Overview
sqlite3 is an npm package that asynchronous, non-blocking SQLite3 bindings. It has 3 known dependents in the graph. The latest version is 6.0.1, released under the BSD-3-Clause license.
Who should use it
Teams working in the npm ecosystem who need asynchronous, non-blocking SQLite3 bindings and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (BSD-3-Clause).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use sqlite3?
sqlite3 is usable, with caveats. This package runs an install script on your machine.
How do I install sqlite3?
Run `npm install sqlite3` to add sqlite3 to your npm project.
How many dependencies does sqlite3 have?
sqlite3 declares 9 direct dependencies and pulls in 9 packages in total once its runtime tree is resolved totalling about 5.7 MB on disk.
What license is sqlite3 released under?
sqlite3 is distributed under the BSD-3-Clause license. Its dependency tree also includes: BlueOak-1.0.0, ISC, MIT.
How popular is sqlite3?
npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on sqlite3.
Is sqlite3 still maintained?
The most recent release of sqlite3 (v6.0.1) was published 6 months ago.
Does sqlite3 run install scripts?
Yes. sqlite3 defines a lifecycle script that executes when the package is installed. Review it before installing in CI or on a machine holding credentials.