liveBook · Manning

Sqlite3

sqlite3 is Python’s standard-library module providing an interface for creating, accessing, querying, and manipulating SQLite databases without a separate server.

How 3 Manning books explain it

A Pythonic Adventure: From Python basics to a working web app

The sqlite3 module is Python's standard-library interface for working with SQLite databases.

How it is used
Replaces file-based order storage with a database-backed Flask application.
How deep it goes
Demonstrates connections, cursors, table creation, inserts, commits, selects, and template display without deeper cursor details.
Examples
Uses a coffee-shop orders table and a Flask page that lists drinks, flavors, toppings, and customer names.
What you can do after
Build a Flask order application that stores and retrieves records with SQLite.

Read how A Pythonic Adventure: From Python basics to a working web app explains sqlite3 →

Practices of the Python Pro

sqlite3 is the Python standard library module that provides access to SQLite databases.

How it is used
Uses Python’s database interface to implement the persistence layer of an application.
How deep it goes
Explains connections, cursors, execution, parameterized CRUD queries, and table creation, without descending into SQLite internals.
Examples
Demonstrates a bookmarks table, DatabaseManager connection, parameterized inserts and deletes, and filtered or ordered selections.
What you can do after
Operate SQLite storage through Python by opening connections and implementing table, insert, delete, and select operations.

Read how Practices of the Python Pro explains sqlite3 →

Coding with AI

The Python standard-library module that provides an interface to SQLite databases.

How it is used
Uses direct SQLite connections when a project deliberately avoids SQLAlchemy and needs database code integrated into an existing class.
How deep it goes
Demonstrates connection, cursor, query, fetch, cleanup, and class integration, but stops short of testing or refining the final method.
Examples
Demonstrates data/questions.db, a users query filtered by id=1, cursor operations, result fetching, connection cleanup, and Questions integration.
What you can do after
Operate a direct SQLite connection and adapt generated code into a class while checking whether unnecessary fetching or printing remains.

Read how Coding with AI explains sqlite3 →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.